3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { private $bar; } $foo = new Foo(); $friend = Closure::bind(function & (Foo $foo) use (& $friend) { return & $foo->bar; }, null, 'Foo')->__invoke($foo); var_dump($foo); $friend = 'baz'; var_dump($foo);
Output for 5.3.0 - 5.4.29
Parse error: syntax error, unexpected '&' in /in/gFZUc on line 10
Process exited with code 255.