3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Everything you enter here will be executed by our servers. Try it! function foo(){ bar(); } function bar() { foobar(); } function foobar() { foobared(); } function foobared() { var_dump(debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 2)); } foo();
Output for 5.4.0 - 7.1.0
array(2) { [0]=> array(4) { ["file"]=> string(9) "/in/UE4AA" ["line"]=> int(13) ["function"]=> string(8) "foobared" ["args"]=> array(0) { } } [1]=> array(4) { ["file"]=> string(9) "/in/UE4AA" ["line"]=> int(9) ["function"]=> string(6) "foobar" ["args"]=> array(0) { } } }
Output for 5.3.6 - 5.3.29
Warning: debug_backtrace() expects at most 1 parameter, 2 given in /in/UE4AA on line 17 NULL
Output for 5.2.5 - 5.3.5
Notice: Use of undefined constant DEBUG_BACKTRACE_PROVIDE_OBJECT - assumed 'DEBUG_BACKTRACE_PROVIDE_OBJECT' in /in/UE4AA on line 17 Warning: debug_backtrace() expects at most 1 parameter, 2 given in /in/UE4AA on line 17 NULL
Output for 4.3.0 - 5.2.4
Notice: Use of undefined constant DEBUG_BACKTRACE_PROVIDE_OBJECT - assumed 'DEBUG_BACKTRACE_PROVIDE_OBJECT' in /in/UE4AA on line 17 Warning: Wrong parameter count for debug_backtrace() in /in/UE4AA on line 17 NULL