3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo($x) { var_dump($x); var_dump($x()); return $x === $x(); } var_dump(foo(call_user_func(function(){})));
based on F7LXP
Output for 7.0.0 - 7.3.0rc3
NULL Fatal error: Uncaught Error: Function name must be a string in /in/e2Yeq:6 Stack trace: #0 /in/e2Yeq(10): foo(NULL) #1 {main} thrown in /in/e2Yeq on line 6
Process exited with code 255.
Output for hhvm-3.22.0
NULL Fatal error: Uncaught Error: Function name must be a string in /in/e2Yeq:-1 Stack trace: #0 /in/e2Yeq(-1): foo() #1 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
NULL Fatal error: Uncaught Error: Function name must be a string in /in/e2Yeq:6 Stack trace: #0 /in/e2Yeq(10): foo() #1 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
NULL Fatal error: Function name must be a string in /in/e2Yeq on line 6
Process exited with code 255.