3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = (object) [ 'foo' => function () { var_dump("Foo"); }, ]; ($foo->foo)();
based on tIDhl
Output for 7.0.0 - 7.3.0beta1
string(3) "Foo"
Output for 5.5.0 - 5.6.28
Parse error: syntax error, unexpected '(' in /in/jpe3d on line 7
Process exited with code 255.