<?php
class base {
	 function calc() {
	 	static $foo = 0;
	 	$foo++;
	 	return $foo;
	 }
}

class one extends base {
	function e() {
		echo "one:".$this->calc().PHP_EOL;
	}
}
class two extends base {
	function p() {
		echo "two:".$this->calc().PHP_EOL;
	}
}
$x = new one();
$y = new two();
$x_repeat = new one();

$x->e();
$y->p();
$x->e();
$x_repeat->e();
$x->e();
$x_repeat->e();
$y->p();
// your code goes here