3v4l.org

run code in 300+ PHP versions simultaneously
<?php $limiter = 50; $func = function() use (&$limiter, &$func) { $limiter--; if (!$limiter) { print "<pre>"; debug_print_backtrace(); throw new Exception("test error"); } if ($limiter <= 0) return; $func(); }; $func();
based on VhoFu
Output for 8.0.0alpha1 - beta1
<pre>#0 {closure}() called at [/in/6QGXt:15] #1 {closure}() called at [/in/6QGXt:15] #2 {closure}() called at [/in/6QGXt:15] #3 {closure}() called at [/in/6QGXt:15] #4 {closure}() called at [/in/6QGXt:15] #5 {closure}() called at [/in/6QGXt:15] #6 {closure}() called at [/in/6QGXt:15] #7 {closure}() called at [/in/6QGXt:15] #8 {closure}() called at [/in/6QGXt:15] #9 {closure}() called at [/in/6QGXt:15] #10 {closure}() called at [/in/6QGXt:15] #11 {closure}() called at [/in/6QGXt:15] #12 {closure}() called at [/in/6QGXt:15] #13 {closure}() called at [/in/6QGXt:15] #14 {closure}() called at [/in/6QGXt:15] #15 {closure}() called at [/in/6QGXt:15] #16 {closure}() called at [/in/6QGXt:15] #17 {closure}() called at [/in/6QGXt:15] #18 {closure}() called at [/in/6QGXt:15] #19 {closure}() called at [/in/6QGXt:15] #20 {closure}() called at [/in/6QGXt:15] #21 {closure}() called at [/in/6QGXt:15] #22 {closure}() called at [/in/6QGXt:15] #23 {closure}() called at [/in/6QGXt:15] #24 {closure}() called at [/in/6QGXt:15] #25 {closure}() called at [/in/6QGXt:15] #26 {closure}() called at [/in/6QGXt:15] #27 {closure}() called at [/in/6QGXt:15] #28 {closure}() called at [/in/6QGXt:15] #29 {closure}() called at [/in/6QGXt:15] #30 {closure}() called at [/in/6QGXt:15] #31 {closure}() called at [/in/6QGXt:15] #32 {closure}() called at [/in/6QGXt:15] #33 {closure}() called at [/in/6QGXt:15] #34 {closure}() called at [/in/6QGXt:15] #35 {closure}() called at [/in/6QGXt:15] #36 {closure}() called at [/in/6QGXt:15] #37 {closure}() called at [/in/6QGXt:15] #38 {closure}() called at [/in/6QGXt:15] #39 {closure}() called at [/in/6QGXt:15] #40 {closure}() called at [/in/6QGXt:15] #41 {closure}() called at [/in/6QGXt:15] #42 {closure}() called at [/in/6QGXt:15] #43 {closure}() called at [/in/6QGXt:15] #44 {closure}() called at [/in/6QGXt:15] #45 {closure}() called at [/in/6QGXt:15] #46 {closure}() called at [/in/6QGXt:15] #47 {closure}() called at [/in/6QGXt:15] #48 {closure}() called at [/in/6QGXt:15] #49 {closure}() called at [/in/6QGXt:18] Fatal error: Uncaught Exception: test error in /in/6QGXt:10 Stack trace: #0 /in/6QGXt(15): {closure}() #1 /in/6QGXt(15): {closure}() #2 /in/6QGXt(15): {closure}() #3 /in/6QGXt(15): {closure}() #4 /in/6QGXt(15): {closure}() #5 /in/6QGXt(15): {closure}() #6 /in/6QGXt(15): {closure}() #7 /in/6QGXt(15): {closure}() #8 /in/6QGXt(15): {closure}() #9 /in/6QGXt(15): {closure}() #10 /in/6QGXt(15): {closure}() #11 /in/6QGXt(15): {closure}() #12 /in/6QGXt(15): {closure}() #13 /in/6QGXt(15): {closure}() #14 /in/6QGXt(15): {closure}() #15 /in/6QGXt(15): {closure}() #16 /in/6QGXt(15): {closure}() #17 /in/6QGXt(15): {closure}() #18 /in/6QGXt(15): {closure}() #19 /in/6QGXt(15): {closure}() #20 /in/6QGXt(15): {closure}() #21 /in/6QGXt(15): {closure}() #22 /in/6QGXt(15): {closure}() #23 /in/6QGXt(15): {closure}() #24 /in/6QGXt(15): {closure}() #25 /in/6QGXt(15): {closure}() #26 /in/6QGXt(15): {closure}() #27 /in/6QGXt(15): {closure}() #28 /in/6QGXt(15): {closure}() #29 /in/6QGXt(15): {closure}() #30 /in/6QGXt(15): {closure}() #31 /in/6QGXt(15): {closure}() #32 /in/6QGXt(15): {closure}() #33 /in/6QGXt(15): {closure}() #34 /in/6QGXt(15): {closure}() #35 /in/6QGXt(15): {closure}() #36 /in/6QGXt(15): {closure}() #37 /in/6QGXt(15): {closure}() #38 /in/6QGXt(15): {closure}() #39 /in/6QGXt(15): {closure}() #40 /in/6QGXt(15): {closure}() #41 /in/6QGXt(15): {closure}() #42 /in/6QGXt(15): {closure}() #43 /in/6QGXt(15): {closure}() #44 /in/6QGXt(15): {closure}() #45 /in/6QGXt(15): {closure}() #46 /in/6QGXt(15): {closure}() #47 /in/6QGXt(15): {closure}() #48 /in/6QGXt(15): {closure}() #49 /in/6QGXt(18): {closure}() #50 {main} thrown in /in/6QGXt on line 10
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.21, 7.4.0 - 7.4.9
<pre>#0 {closure}() called at [/in/6QGXt:15] #1 {closure}() called at [/in/6QGXt:15] #2 {closure}() called at [/in/6QGXt:15] #3 {closure}() called at [/in/6QGXt:15] #4 {closure}() called at [/in/6QGXt:15] #5 {closure}() called at [/in/6QGXt:15] #6 {closure}() called at [/in/6QGXt:15] #7 {closure}() called at [/in/6QGXt:15] #8 {closure}() called at [/in/6QGXt:15] #9 {closure}() called at [/in/6QGXt:15] #10 {closure}() called at [/in/6QGXt:15] #11 {closure}() called at [/in/6QGXt:15] #12 {closure}() called at [/in/6QGXt:15] #13 {closure}() called at [/in/6QGXt:15] #14 {closure}() called at [/in/6QGXt:15] #15 {closure}() called at [/in/6QGXt:15] #16 {closure}() called at [/in/6QGXt:15] #17 {closure}() called at [/in/6QGXt:15] #18 {closure}() called at [/in/6QGXt:15] #19 {closure}() called at [/in/6QGXt:15] #20 {closure}() called at [/in/6QGXt:15] #21 {closure}() called at [/in/6QGXt:15] #22 {closure}() called at [/in/6QGXt:15] #23 {closure}() called at [/in/6QGXt:15] #24 {closure}() called at [/in/6QGXt:15] #25 {closure}() called at [/in/6QGXt:15] #26 {closure}() called at [/in/6QGXt:15] #27 {closure}() called at [/in/6QGXt:15] #28 {closure}() called at [/in/6QGXt:15] #29 {closure}() called at [/in/6QGXt:15] #30 {closure}() called at [/in/6QGXt:15] #31 {closure}() called at [/in/6QGXt:15] #32 {closure}() called at [/in/6QGXt:15] #33 {closure}() called at [/in/6QGXt:15] #34 {closure}() called at [/in/6QGXt:15] #35 {closure}() called at [/in/6QGXt:15] #36 {closure}() called at [/in/6QGXt:15] #37 {closure}() called at [/in/6QGXt:15] #38 {closure}() called at [/in/6QGXt:15] #39 {closure}() called at [/in/6QGXt:15] #40 {closure}() called at [/in/6QGXt:15] #41 {closure}() called at [/in/6QGXt:15] #42 {closure}() called at [/in/6QGXt:15] #43 {closure}() called at [/in/6QGXt:15] #44 {closure}() called at [/in/6QGXt:15] #45 {closure}() called at [/in/6QGXt:15] #46 {closure}() called at [/in/6QGXt:15] #47 {closure}() called at [/in/6QGXt:15] #48 {closure}() called at [/in/6QGXt:15] #49 {closure}() called at [/in/6QGXt:18] Fatal error: Uncaught Exception: test error in /in/6QGXt:10 Stack trace: #0 /in/6QGXt(15): {closure}() #1 /in/6QGXt(15): {closure}() #2 /in/6QGXt(15): {closure}() #3 /in/6QGXt(15): {closure}() #4 /in/6QGXt(15): {closure}() #5 /in/6QGXt(15): {closure}() #6 /in/6QGXt(15): {closure}() #7 /in/6QGXt(15): {closure}() #8 /in/6QGXt(15): {closure}() #9 /in/6QGXt(15): {closure}() #10 /in/6QGXt(15): {closure}() #11 /in/6QGXt(15): {closure}() #12 /in/6QGXt(15): {closure}() #13 /in/6QGXt(15): {closure}() #14 /in/6QGXt(15): {closure}() #15 /in/6QGXt(15): {closure}() #16 /in/6QGXt(15): {closure}() #17 /in/6QGXt(15): {closure}() #18 /in/6QGXt(15): {closure}() #19 /in/6QGXt(15): {closure}() #20 /in/6QGXt(15): {closure}() #21 /in/6QGXt(15): {closure}() #22 /in/6QGXt(15): {closure}() #23 /in/6QGXt(15): {closure}() #24 /in/6QGXt(15): {closure}() #25 /in/6QGXt(15): {closure}() #26 /in/6QGXt(15): {closure}() #27 /in/6QGXt(15): {closure}() #28 /in/6QGXt(15): {closure}() #29 /in/6QGXt(15): {closure}() #30 /in/6QGXt(15): {closure}() #31 /in/6QGXt in /in/6QGXt on line 10
Process exited with code 255.
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
<pre>#0 {closure}() called at [/in/6QGXt:15] #1 {closure}() called at [/in/6QGXt:15] #2 {closure}() called at [/in/6QGXt:15] #3 {closure}() called at [/in/6QGXt:15] #4 {closure}() called at [/in/6QGXt:15] #5 {closure}() called at [/in/6QGXt:15] #6 {closure}() called at [/in/6QGXt:15] #7 {closure}() called at [/in/6QGXt:15] #8 {closure}() called at [/in/6QGXt:15] #9 {closure}() called at [/in/6QGXt:15] #10 {closure}() called at [/in/6QGXt:15] #11 {closure}() called at [/in/6QGXt:15] #12 {closure}() called at [/in/6QGXt:15] #13 {closure}() called at [/in/6QGXt:15] #14 {closure}() called at [/in/6QGXt:15] #15 {closure}() called at [/in/6QGXt:15] #16 {closure}() called at [/in/6QGXt:15] #17 {closure}() called at [/in/6QGXt:15] #18 {closure}() called at [/in/6QGXt:15] #19 {closure}() called at [/in/6QGXt:15] #20 {closure}() called at [/in/6QGXt:15] #21 {closure}() called at [/in/6QGXt:15] #22 {closure}() called at [/in/6QGXt:15] #23 {closure}() called at [/in/6QGXt:15] #24 {closure}() called at [/in/6QGXt:15] #25 {closure}() called at [/in/6QGXt:15] #26 {closure}() called at [/in/6QGXt:15] #27 {closure}() called at [/in/6QGXt:15] #28 {closure}() called at [/in/6QGXt:15] #29 {closure}() called at [/in/6QGXt:15] #30 {closure}() called at [/in/6QGXt:15] #31 {closure}() called at [/in/6QGXt:15] #32 {closure}() called at [/in/6QGXt:15] #33 {closure}() called at [/in/6QGXt:15] #34 {closure}() called at [/in/6QGXt:15] #35 {closure}() called at [/in/6QGXt:15] #36 {closure}() called at [/in/6QGXt:15] #37 {closure}() called at [/in/6QGXt:15] #38 {closure}() called at [/in/6QGXt:15] #39 {closure}() called at [/in/6QGXt:15] #40 {closure}() called at [/in/6QGXt:15] #41 {closure}() called at [/in/6QGXt:15] #42 {closure}() called at [/in/6QGXt:15] #43 {closure}() called at [/in/6QGXt:15] #44 {closure}() called at [/in/6QGXt:15] #45 {closure}() called at [/in/6QGXt:15] #46 {closure}() called at [/in/6QGXt:15] #47 {closure}() called at [/in/6QGXt:15] #48 {closure}() called at [/in/6QGXt:15] #49 {closure}() called at [/in/6QGXt:18] Fatal error: Uncaught exception 'Exception' with message 'test error' in /in/6QGXt:10 Stack trace: #0 /in/6QGXt(15): {closure}() #1 /in/6QGXt(15): {closure}() #2 /in/6QGXt(15): {closure}() #3 /in/6QGXt(15): {closure}() #4 /in/6QGXt(15): {closure}() #5 /in/6QGXt(15): {closure}() #6 /in/6QGXt(15): {closure}() #7 /in/6QGXt(15): {closure}() #8 /in/6QGXt(15): {closure}() #9 /in/6QGXt(15): {closure}() #10 /in/6QGXt(15): {closure}() #11 /in/6QGXt(15): {closure}() #12 /in/6QGXt(15): {closure}() #13 /in/6QGXt(15): {closure}() #14 /in/6QGXt(15): {closure}() #15 /in/6QGXt(15): {closure}() #16 /in/6QGXt(15): {closure}() #17 /in/6QGXt(15): {closure}() #18 /in/6QGXt(15): {closure}() #19 /in/6QGXt(15): {closure}() #20 /in/6QGXt(15): {closure}() #21 /in/6QGXt(15): {closure}() #22 /in/6QGXt(15): {closure}() #23 /in/6QGXt(15): {closure}() #24 /in/6QGXt(15): {closure}() #25 /in/6QGXt(15): {closure}() #26 /in/6QGXt(15): {closure}() #27 /in/6QGXt(15): {closure}() #28 /in/6QGXt(15): {closure}() #29 /in/6QGXt(15): {closure}() #30 /in/6QGXt(15): in /in/6QGXt on line 10
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/6QGXt on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION in /in/6QGXt on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/6QGXt on line 3
Process exited with code 255.