3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function a() { b(); } function b() { c(); } function c() { d(); } function d() { e(); } function e() { var_dump(debug_backtrace(false, 3)); } a();
Output for 5.4.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(3) { [0]=> array(4) { ["file"]=> string(9) "/in/acqF8" ["line"]=> int(20) ["function"]=> string(1) "e" ["args"]=> array(0) { } } [1]=> array(4) { ["file"]=> string(9) "/in/acqF8" ["line"]=> int(15) ["function"]=> string(1) "d" ["args"]=> array(0) { } } [2]=> array(4) { ["file"]=> string(9) "/in/acqF8" ["line"]=> int(10) ["function"]=> string(1) "c" ["args"]=> array(0) { } } }
Output for 5.2.5 - 5.3.29
Warning: debug_backtrace() expects at most 1 parameter, 2 given in /in/acqF8 on line 25 NULL
Output for 4.3.0 - 5.2.4
Warning: Wrong parameter count for debug_backtrace() in /in/acqF8 on line 25 NULL