3v4l.org

run code in 300+ PHP versions simultaneously
<?php $limiter = 20; $func = function() use (&$limiter, &$func) { $limiter--; if (!$limiter) { print "<pre>"; debug_print_backtrace(); throw new Exception("test error"); } if ($limiter <= 0) return; $func(); }; $func();
Output for 7.1.26 - 7.1.33, 7.2.17 - 7.2.33, 7.3.0 - 7.3.21, 7.4.0 - 7.4.9, 8.0.0alpha1 - beta1
<pre>#0 {closure}() called at [/in/VhoFu:15] #1 {closure}() called at [/in/VhoFu:15] #2 {closure}() called at [/in/VhoFu:15] #3 {closure}() called at [/in/VhoFu:15] #4 {closure}() called at [/in/VhoFu:15] #5 {closure}() called at [/in/VhoFu:15] #6 {closure}() called at [/in/VhoFu:15] #7 {closure}() called at [/in/VhoFu:15] #8 {closure}() called at [/in/VhoFu:15] #9 {closure}() called at [/in/VhoFu:15] #10 {closure}() called at [/in/VhoFu:15] #11 {closure}() called at [/in/VhoFu:15] #12 {closure}() called at [/in/VhoFu:15] #13 {closure}() called at [/in/VhoFu:15] #14 {closure}() called at [/in/VhoFu:15] #15 {closure}() called at [/in/VhoFu:15] #16 {closure}() called at [/in/VhoFu:15] #17 {closure}() called at [/in/VhoFu:15] #18 {closure}() called at [/in/VhoFu:15] #19 {closure}() called at [/in/VhoFu:18] Fatal error: Uncaught Exception: test error in /in/VhoFu:10 Stack trace: #0 /in/VhoFu(15): {closure}() #1 /in/VhoFu(15): {closure}() #2 /in/VhoFu(15): {closure}() #3 /in/VhoFu(15): {closure}() #4 /in/VhoFu(15): {closure}() #5 /in/VhoFu(15): {closure}() #6 /in/VhoFu(15): {closure}() #7 /in/VhoFu(15): {closure}() #8 /in/VhoFu(15): {closure}() #9 /in/VhoFu(15): {closure}() #10 /in/VhoFu(15): {closure}() #11 /in/VhoFu(15): {closure}() #12 /in/VhoFu(15): {closure}() #13 /in/VhoFu(15): {closure}() #14 /in/VhoFu(15): {closure}() #15 /in/VhoFu(15): {closure}() #16 /in/VhoFu(15): {closure}() #17 /in/VhoFu(15): {closure}() #18 /in/VhoFu(15): {closure}() #19 /in/VhoFu(18): {closure}() #20 {main} thrown in /in/VhoFu on line 10
Process exited with code 255.