3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function bar() { var_dump(func_get_args()); } } $input = new StdClass(); $input->method = array('Foo', 'bar'); $input->args = array(123, 456); call_user_func_array($input->method, $input->args); // NOT WORKING call_user_func_array($input->method, (array) $input->args); // NOT WORKING it just don't goes in the methods call call_user_func_array($input->method, array((array) $input->args)); // WORKING !!

preferences:
34.41 ms | 402 KiB | 5 Q