3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo () { throw new \Exception(); } try { array_map('foo', [1]); } catch(\Exception $e) { echo 'Exception caught'; }
based on 5WJU5
Output for 7.0.0 - 7.2.0
Exception caught
Output for 5.4.2 - 5.6.28
Warning: array_map(): An error occurred while invoking the map callback in /in/PZFrf on line 7 Exception caught
Output for 5.3.17 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/PZFrf on line 7
Process exited with code 255.