3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function f() { var_dump(func_get_args()); } var_dump(call_user_func_array('f', new stdClass())); var_dump(call_user_func_array('f', 42)); var_dump(call_user_func_array('f', null)); var_dump(call_user_func_array('f', 3.14));
Output for 7.0.0 - 7.1.0
Warning: call_user_func_array() expects parameter 2 to be array, object given in /in/ces2F on line 7 NULL Warning: call_user_func_array() expects parameter 2 to be array, integer given in /in/ces2F on line 9 NULL Warning: call_user_func_array() expects parameter 2 to be array, null given in /in/ces2F on line 11 NULL Warning: call_user_func_array() expects parameter 2 to be array, float given in /in/ces2F on line 13 NULL
Output for 4.3.0 - 5.2.17, hhvm-3.10.0 - 3.12.0
array(0) { } NULL array(1) { [0]=> int(42) } NULL array(0) { } NULL array(1) { [0]=> float(3.14) } NULL
Output for 5.3.0 - 5.6.28
Warning: call_user_func_array() expects parameter 2 to be array, object given in /in/ces2F on line 7 NULL Warning: call_user_func_array() expects parameter 2 to be array, integer given in /in/ces2F on line 9 NULL Warning: call_user_func_array() expects parameter 2 to be array, null given in /in/ces2F on line 11 NULL Warning: call_user_func_array() expects parameter 2 to be array, double given in /in/ces2F on line 13 NULL