3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public static function bar() { call_user_func_array('self::baz', []); } public static function baz() { die('failed'); } } class Bar { public static function baz() { die('Worked!'); } } Bar::bar();
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined method Bar::bar() in /in/qe1ZJ:28 Stack trace: #0 {main} thrown in /in/qe1ZJ on line 28
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Call to undefined method Bar::bar() in /in/qe1ZJ on line 28
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/qe1ZJ on line 8
Process exited with code 255.