3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = function($var1, $var2) { var_dump($var1, $var2); }; call_user_func('foo', ['bar', 'baz']);
based on IdYu9
Output for 5.4.0 - 7.3.1
Warning: call_user_func() expects parameter 1 to be a valid callback, function 'foo' not found or invalid function name in /in/8qqPT on line 7
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/8qqPT on line 7
Process exited with code 255.