3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function () { throw new \Exception(); }); call_user_func(function (array &$ref) {}, 'not_an_array_variable');
Output for 8.4.1 - 8.4.12
Fatal error: Uncaught Exception in /in/U8MU4:3 Stack trace: #0 /in/U8MU4(6): {closure:/in/U8MU4:2}(2, '{closure:/in/U8...', '/in/U8MU4', 6) #1 {main} thrown in /in/U8MU4 on line 3
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25
Fatal error: Uncaught Exception in /in/U8MU4:3 Stack trace: #0 /in/U8MU4(6): {closure}(2, '{closure}(): Ar...', '/in/U8MU4', 6) #1 {main} thrown in /in/U8MU4 on line 3
Process exited with code 255.
Output for 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
Fatal error: Uncaught Exception in /in/U8MU4:3 Stack trace: #0 /in/U8MU4(6): {closure}(2, 'Parameter 1 to ...', '/in/U8MU4', 6, Array) #1 {main} thrown in /in/U8MU4 on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Fatal error: Uncaught TypeError: Argument 1 passed to {closure}() must be of the type array, string given, called in /in/U8MU4 on line 6 and defined in /in/U8MU4:6 Stack trace: #0 /in/U8MU4(6): {closure}('not_an_array_va...') #1 {main} thrown in /in/U8MU4 on line 6
Process exited with code 255.

preferences:
55.48 ms | 410 KiB | 5 Q