3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { public function test() { echo 'test'; } } function changeMe(&$obj) { $obj = function(){ $test = function(){echo 'im a test'}; }; } $foo = new Foo(); var_dump($foo); changeMe($foo); $foo->test();
Output for 5.3.0 - 5.4.26
Parse error: syntax error, unexpected '}', expecting ',' or ';' in /in/g3Eup on line 14
Process exited with code 255.