3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function html($value) { return htmlentities($value); } class Foo { function html($value) { return htmlentities($value); } } $value = '123'; $object = new Foo(); htmlentities($value); html($value); $object->html($value); call_user_func('html', $value); call_user_func(array($object, 'html'), $value); call_user_func_array($func, array($value)); call_user_func_array(array($object, 'html'), array($value));
based on sTKAB
Output for 5.3.0 - 7.2.0
Notice: Undefined variable: func in /in/be3Nv on line 25 Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in /in/be3Nv on line 25
Output for 5.0.4 - 5.2.17
Notice: Undefined variable: func in /in/be3Nv on line 25 Warning: call_user_func_array(): First argument is expected to be a valid callback, '' was given in /in/be3Nv on line 25
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: func in /in/be3Nv on line 25 Warning: call_user_func_array(): First argument is expected to be a valid callback, '' was given in /in/be3Nv on line 25
Output for 4.3.2 - 4.4.9
Notice: Undefined variable: func in /in/be3Nv on line 25 Warning: call_user_func_array(): First argumented is expected to be a valid callback, '' was given in /in/be3Nv on line 25
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: func in /in/be3Nv on line 25 Warning: call_user_func_array() [http://www.php.net/function.call-user-func-array]: First argumented is expected to be a valid callback, '' was given in /in/be3Nv on line 25