3v4l.org

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

preferences:
34.19 ms | 402 KiB | 5 Q