3v4l.org

run code in 300+ PHP versions simultaneously
<?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 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
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 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 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

preferences:
255.14 ms | 402 KiB | 313 Q