3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php try { throw new Exception; } catch(Exception $e) { print_r(debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT)); var_dump($e->getTrace()); } ?>
Output for 5.3.6 - 7.1.0
Array ( ) array(0) { }
Output for 5.2.5 - 5.3.5
Notice: Use of undefined constant DEBUG_BACKTRACE_PROVIDE_OBJECT - assumed 'DEBUG_BACKTRACE_PROVIDE_OBJECT' in /in/KPhNp on line 7 Array ( ) array(0) { }
Output for 5.0.0 - 5.0.2, 5.0.5 - 5.2.4
Notice: Use of undefined constant DEBUG_BACKTRACE_PROVIDE_OBJECT - assumed 'DEBUG_BACKTRACE_PROVIDE_OBJECT' in /in/KPhNp on line 7 Warning: Wrong parameter count for debug_backtrace() in /in/KPhNp on line 7 array(0) { }
Output for 5.0.3 - 5.0.4
Notice: Use of undefined constant DEBUG_BACKTRACE_PROVIDE_OBJECT - assumed 'DEBUG_BACKTRACE_PROVIDE_OBJECT' in /in/KPhNp on line 7 Warning: Wrong parameter count for debug_backtrace() in /in/KPhNp on line 7 array(1) { [0]=> array(3) { ["file"]=> string(9) "/in/KPhNp" ["line"]=> int(5) ["function"]=> string(7) "unknown" } }
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '{' in /in/KPhNp on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected '{' in /in/KPhNp on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/KPhNp on line 4
Process exited with code 255.