3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function make() { class Foo { public function getClass() { return call_user_func(function () { return call_user_func(function () { return [__CLASS__, __METHOD__, __FUNCTION__]}); }); } } return new Foo(); } $foo = make(); var_dump($foo->getClass());
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected '}' in /in/NaDhI on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected '[' in /in/NaDhI on line 8
Process exited with code 255.