3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php <?php class SomeObject { protected $message; public function __construct($message) { $this->message = $message; } } class Proxy extends SomeObject { protected $proxied; public function __construct(SomeObject $o) { $this->proxied = $o; } public function __get( $property ){ return $this->proxied->message; } public function __call( $m,$data ){ $this->proxied->message = $data[0]; } } $p = new Proxy( new SomeObject('Hope springs eternal.')); echo $p->QuoteOfTheDay; $p->ResetMessage('Never say "Never!"'); echo $p->QuoteOfTheDay;
Output for 5.3.0 - 5.4.22
Parse error: syntax error, unexpected '<' in /in/5942q on line 2
Process exited with code 255.