3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class TimePeriod { private $Seconds; // <-- Traditional Property public $Hours { // <-- Guarded Property get() { return $this->Seconds / 3600; } // <-- Accessor, more specifically a getter set($x) { $this->Seconds = $x* 3600; } // <-- Accessor, more specifically a setter isset() { return isset($this->Seconds); } // <-- Accessor, more specifically an issetter unset() { unset($this->Seconds); } // <-- Accessor, more specifically an unsetter } }
Output for 5.3.0 - 5.4.11
Parse error: syntax error, unexpected '{', expecting ',' or ';' in /in/WHutV on line 6
Process exited with code 255.