- Output for 8.1.23 - 8.1.27, 8.2.10 - 8.2.17, 8.3.0 - 8.3.4
- 'foo'
- Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.6
- Parse error: syntax error, unexpected 'throw' (T_THROW) in /in/6AfAD on line 4
Process exited with code 255.
<?php
function foo() {
return (throw new \Exception(__FUNCTION__));
}
try {
foo();
}
catch (\Exception $e) {
var_export($e->getMessage());
}