3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php array_map(function () { throw new \Exception(); }, [1]);
based on SXgmh
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception in /in/YrA4b:6 Stack trace: #0 [internal function]: {closure}(1) #1 /in/YrA4b(7): array_map(Object(Closure), Array) #2 {main} thrown in /in/YrA4b on line 6
Process exited with code 255.
Output for 5.4.2 - 5.6.28
Warning: array_map(): An error occurred while invoking the map callback in /in/YrA4b on line 7 Fatal error: Uncaught exception 'Exception' in /in/YrA4b:6 Stack trace: #0 [internal function]: {closure}(1) #1 /in/YrA4b(7): array_map(Object(Closure), Array) #2 {main} thrown in /in/YrA4b on line 6
Process exited with code 255.
Output for 5.3.17 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/YrA4b on line 7
Process exited with code 255.