3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function suppress(...$suppressedExceptions) { $fn = function (\Throwable $t) use ($suppressedExceptions) { forach ($suppressedExceptions as $suppressedException) { if ($t instanceof $suppressedException) { return; } } throw $t; }; return $fn; } $fn = suppress("\Exception"); $fn(new StdClass);
based on 3jvc4
Output for 7.0.0 - 7.0.2
Parse error: syntax error, unexpected 'as' (T_AS), expecting ',' or ')' in /in/QQ2OP on line 5
Process exited with code 255.
Output for 5.6.8 - 5.6.16
Parse error: syntax error, unexpected 'as' (T_AS) in /in/QQ2OP on line 5
Process exited with code 255.
Output for 5.4.11 - 5.5.30
Parse error: syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE) in /in/QQ2OP on line 3
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '.', expecting '&' or T_VARIABLE in /in/QQ2OP on line 3
Process exited with code 255.