3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class wpdb { function bail() { wp_die(); } } function wp_die() { $stacktrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 2 ); $last = array_pop( $stacktrace ); var_dump($last); } function a() { b(); } function b() { c(); } function c() { d(); } function d() { $a = new wpdb(); $a->bail(); } a();
Output for 5.4.0 - 7.2.0
array(5) { ["file"]=> string(9) "/in/FPvfn" ["line"]=> int(29) ["function"]=> string(4) "bail" ["class"]=> string(4) "wpdb" ["type"]=> string(2) "->" }
Output for 5.3.6 - 5.3.29
Warning: debug_backtrace() expects at most 1 parameter, 2 given in /in/FPvfn on line 10 Warning: array_pop() expects parameter 1 to be array, null given in /in/FPvfn on line 11 NULL
Output for 5.3.0 - 5.3.5
Notice: Use of undefined constant DEBUG_BACKTRACE_IGNORE_ARGS - assumed 'DEBUG_BACKTRACE_IGNORE_ARGS' in /in/FPvfn on line 10 Warning: debug_backtrace() expects at most 1 parameter, 2 given in /in/FPvfn on line 10 Warning: array_pop() expects parameter 1 to be array, null given in /in/FPvfn on line 11 NULL
Output for 5.2.5 - 5.2.17
Notice: Use of undefined constant DEBUG_BACKTRACE_IGNORE_ARGS - assumed 'DEBUG_BACKTRACE_IGNORE_ARGS' in /in/FPvfn on line 10 Warning: debug_backtrace() expects at most 1 parameter, 2 given in /in/FPvfn on line 10 Warning: array_pop(): The argument should be an array in /in/FPvfn on line 11 NULL
Output for 4.3.2 - 5.2.4
Notice: Use of undefined constant DEBUG_BACKTRACE_IGNORE_ARGS - assumed 'DEBUG_BACKTRACE_IGNORE_ARGS' in /in/FPvfn on line 10 Warning: Wrong parameter count for debug_backtrace() in /in/FPvfn on line 10 Warning: array_pop(): The argument should be an array in /in/FPvfn on line 11 NULL
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant DEBUG_BACKTRACE_IGNORE_ARGS - assumed 'DEBUG_BACKTRACE_IGNORE_ARGS' in /in/FPvfn on line 10 Warning: Wrong parameter count for debug_backtrace() in /in/FPvfn on line 10 Warning: array_pop() [http://www.php.net/function.array-pop]: The argument should be an array in /in/FPvfn on line 11 NULL