3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function a($depth = 0) { //return last backtrace call. If backtrace bigger then 3, return third call. if($depth === 1000) { return array_slice(array_filter(array_slice(debug_backtrace(false, 3), 0, 3)), -1, 1); } return a(++$depth, str_repeat("a", 1000)); } var_dump(a());
Output for hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(1) { [0]=> array(4) { ["file"]=> string(9) "/in/kcGs1" ["line"]=> int(10) ["function"]=> string(1) "a" ["args"]=> array(2) { [0]=> int(999) [1]=> string(1000) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } }
Output for 5.3.0 - 5.3.29
Warning: debug_backtrace() expects at most 1 parameter, 2 given in /in/kcGs1 on line 7 Warning: array_slice() expects parameter 1 to be array, null given in /in/kcGs1 on line 7 Warning: array_filter() expects parameter 1 to be array, null given in /in/kcGs1 on line 7 Warning: array_slice() expects parameter 1 to be array, null given in /in/kcGs1 on line 7 NULL
Output for 5.2.6 - 5.2.17
Warning: debug_backtrace() expects at most 1 parameter, 2 given in /in/kcGs1 on line 7 Warning: array_slice() expects parameter 1 to be array, null given in /in/kcGs1 on line 7 Warning: array_filter(): The first argument should be an array in /in/kcGs1 on line 7 Warning: array_slice() expects parameter 1 to be array, null given in /in/kcGs1 on line 7 NULL
Output for 5.2.5
Warning: debug_backtrace() expects at most 1 parameter, 2 given in /in/kcGs1 on line 7 Warning: array_slice(): The first argument should be an array in /in/kcGs1 on line 7 Warning: array_filter(): The first argument should be an array in /in/kcGs1 on line 7 Warning: array_slice(): The first argument should be an array in /in/kcGs1 on line 7 NULL
Output for 4.3.2 - 5.2.4
Warning: Wrong parameter count for debug_backtrace() in /in/kcGs1 on line 7 Warning: array_slice(): The first argument should be an array in /in/kcGs1 on line 7 Warning: array_filter(): The first argument should be an array in /in/kcGs1 on line 7 Warning: array_slice(): The first argument should be an array in /in/kcGs1 on line 7 NULL
Output for 4.3.0 - 4.3.1
Warning: Wrong parameter count for debug_backtrace() in /in/kcGs1 on line 7 Warning: array_slice() [http://www.php.net/function.array-slice]: The first argument should be an array in /in/kcGs1 on line 7 Warning: array_filter() [http://www.php.net/function.array-filter]: The first argument should be an array in /in/kcGs1 on line 7 Warning: array_slice() [http://www.php.net/function.array-slice]: The first argument should be an array in /in/kcGs1 on line 7 NULL