3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class wpdb { function bail() { register_shutdown_function('test'); wp_die(); } } function test() { var_dump(debug_backtrace(0, 3)); } function wp_die() { die('x'); } $a = new wpdb(); $a->bail();
based on 5YDZP
Output for 5.4.0 - 7.2.0
xarray(1) { [0]=> array(2) { ["function"]=> string(4) "test" ["args"]=> array(0) { } } }
Output for 5.2.5 - 5.3.29
x Warning: debug_backtrace() expects at most 1 parameter, 2 given in /in/WPYX5 on line 11 NULL
Output for 4.3.0 - 5.2.4
x Warning: Wrong parameter count for debug_backtrace() in /in/WPYX5 on line 11 NULL