3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class x { public function __construct() { $x =& $this; $x = new stdClass; $x->xx = 123; var_dump($this); } public function test() { var_dump($this); } } $x = new x; var_dump($x); $x->test()
Output for 5.4.0 - 5.4.7
Parse error: syntax error, unexpected end of file in /in/qd8ZQ on line 21
Process exited with code 255.
Output for 5.3.0 - 5.3.17
Parse error: syntax error, unexpected $end in /in/qd8ZQ on line 21
Process exited with code 255.