3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function userland_func_get_args() { return debug_backtrace(); } function foo() { return func_get_args(); } function bar() { return userland_func_get_args(); } var_dump(foo('foo', 'bar')); var_dump(bar('foo', 'bar'));
Output for 4.3.0 - 7.1.0
array(2) { [0]=> string(3) "foo" [1]=> string(3) "bar" } array(2) { [0]=> array(4) { ["file"]=> string(9) "/in/R71Bk" ["line"]=> int(6) ["function"]=> string(22) "userland_func_get_args" ["args"]=> array(0) { } } [1]=> array(4) { ["file"]=> string(9) "/in/R71Bk" ["line"]=> int(9) ["function"]=> string(3) "bar" ["args"]=> array(2) { [0]=> string(3) "foo" [1]=> string(3) "bar" } } }