3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo() { var_dump(bar()); } function bar() { return debug_backtrace(); } call_user_func("foo");
Output for hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(2) { [0]=> array(4) { ["file"]=> string(9) "/in/YdubX" ["line"]=> int(3) ["function"]=> string(3) "bar" ["args"]=> array(0) { } } [1]=> array(4) { ["file"]=> string(9) "/in/YdubX" ["line"]=> int(8) ["function"]=> string(3) "foo" ["args"]=> array(0) { } } }
Output for 4.3.0 - 4.4.9, 5.0.5 - 5.6.28
array(3) { [0]=> array(4) { ["file"]=> string(9) "/in/YdubX" ["line"]=> int(3) ["function"]=> string(3) "bar" ["args"]=> array(0) { } } [1]=> array(2) { ["function"]=> string(3) "foo" ["args"]=> array(0) { } } [2]=> array(4) { ["file"]=> string(9) "/in/YdubX" ["line"]=> int(8) ["function"]=> string(14) "call_user_func" ["args"]=> array(1) { [0]=> &string(3) "foo" } } }
Output for 5.0.0 - 5.0.4
array(3) { [0]=> array(4) { ["file"]=> string(9) "/in/YdubX" ["line"]=> int(3) ["function"]=> string(3) "bar" ["args"]=> array(0) { } } [1]=> array(4) { ["file"]=> string(9) "/in/YdubX" ["line"]=> int(8) ["function"]=> string(3) "foo" ["args"]=> array(0) { } } [2]=> array(4) { ["file"]=> string(9) "/in/YdubX" ["line"]=> int(8) ["function"]=> string(14) "call_user_func" ["args"]=> array(1) { [0]=> &string(3) "foo" } } }