3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php array_map(function($element) { throw new \Exception('inner'); }, [1, 2, 4]);
Output for 7.0.0 - 7.3.0alpha1
Fatal error: Uncaught Exception: inner in /in/nKXin:4 Stack trace: #0 [internal function]: {closure}(1) #1 /in/nKXin(5): array_map(Object(Closure), Array) #2 {main} thrown in /in/nKXin on line 4
Process exited with code 255.
Output for 5.4.12 - 5.6.28
Warning: array_map(): An error occurred while invoking the map callback in /in/nKXin on line 5 Fatal error: Uncaught exception 'Exception' with message 'inner' in /in/nKXin:4 Stack trace: #0 [internal function]: {closure}(1) #1 /in/nKXin(5): array_map(Object(Closure), Array) #2 {main} thrown in /in/nKXin on line 4
Process exited with code 255.
Output for 5.3.22 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/nKXin on line 5
Process exited with code 255.