3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { function bar() { echo 'go'; } } function call(callable $func) { call_user_fun($func); } $foo = new Foo; call([$foo, 'bar']);
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function call_user_fun() in /in/UaqaA:10 Stack trace: #0 /in/UaqaA(15): call(Array) #1 {main} thrown in /in/UaqaA on line 10
Process exited with code 255.
Output for 5.4.12 - 5.6.28
Fatal error: Call to undefined function call_user_fun() in /in/UaqaA on line 10
Process exited with code 255.
Output for 5.3.22 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/UaqaA on line 15
Process exited with code 255.