public function __get($name) { switch ($name) { case 'total_time': return $this->end_time - $this->start_time; default: return $this->{$name}; } }