{ $this->initialTime = microtime(true); } protected function timeElapsed() { $otro = "initialTime"; echo $this->{$otro}; echo "\n"; echo $this->initialTime; $timeElapsed = $this->timeEnd(); $timeElapsed = $timeElapsed - $this->{$otro}; } protected function timeEnd() { $timeEnd = microtime(true); return $timeEnd; } } function setStartTime() { } class Prueba extends ExecuteTime { public function mesuaredFunction() { echo "test"; } } $prueba = new Prueba(); $prueba->calculateTimeOfExecution(); include "php1.php";