3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function f($a){ print_r(debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT)); } $var = 1; f($var);
based on O6a97
Output for 5.3.6 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => Array ( [file] => /in/Z8t8W [line] => 6 [function] => f [args] => Array ( [0] => 1 ) ) )
Output for 5.2.5 - 5.3.5
Notice: Use of undefined constant DEBUG_BACKTRACE_PROVIDE_OBJECT - assumed 'DEBUG_BACKTRACE_PROVIDE_OBJECT' in /in/Z8t8W on line 3 Array ( [0] => Array ( [file] => /in/Z8t8W [line] => 6 [function] => f [args] => Array ( [0] => 1 ) ) )
Output for 4.3.0 - 5.2.4
Notice: Use of undefined constant DEBUG_BACKTRACE_PROVIDE_OBJECT - assumed 'DEBUG_BACKTRACE_PROVIDE_OBJECT' in /in/Z8t8W on line 3 Warning: Wrong parameter count for debug_backtrace() in /in/Z8t8W on line 3