3v4l.org

run code in 300+ PHP versions simultaneously
<?php array_reduce(['a'], function () { throw new \Exception(); });
Output for 8.4.1 - 8.4.14
Fatal error: Uncaught Exception in /in/sW6Mb:3 Stack trace: #0 [internal function]: {closure:/in/sW6Mb:3}(NULL, 'a') #1 /in/sW6Mb(3): array_reduce(Array, Object(Closure)) #2 {main} thrown in /in/sW6Mb on line 3
Process exited with code 255.
Output for 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.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.27
Fatal error: Uncaught Exception in /in/sW6Mb:3 Stack trace: #0 [internal function]: {closure}(NULL, 'a') #1 /in/sW6Mb(3): array_reduce(Array, Object(Closure)) #2 {main} thrown in /in/sW6Mb on line 3
Process exited with code 255.
Output for 5.6.0 - 5.6.24
Warning: array_reduce(): An error occurred while invoking the reduction callback in /in/sW6Mb on line 3 Fatal error: Uncaught exception 'Exception' in /in/sW6Mb:3 Stack trace: #0 [internal function]: {closure}(NULL, 'a') #1 /in/sW6Mb(3): array_reduce(Array, Object(Closure)) #2 {main} thrown in /in/sW6Mb on line 3
Process exited with code 255.

preferences:
80.26 ms | 409 KiB | 5 Q