try/catch/finally is not implemented, so any error handling typed into the REPL fails outright.
phunkie > try { throw new RuntimeException("boom"); } catch (Exception $e) { echo $e->getMessage(); }
Error: Evaluation error: Unsupported statement type: PhpParser\Node\Stmt\TryCatch
evaluateAst() has no Node\Stmt\TryCatch branch, so it falls through to the catch-all at src/Functions/evaluation.php:286.
This is probably the most valuable of the missing statement types: exception handling is ordinary PHP that users will reach for constantly, and throw already works (features/repl/throw_expressions.feature), which makes the gap more surprising — you can throw but not catch.
It also blocks acceptance coverage for a PHP 8.5 change: a missing trait became a catchable Error rather than a fatal, which can only be demonstrated with try/catch.
Needs TryCatch and Finally_ branches, covering multi-catch (catch (A|B $e)), catch without a variable (catch (Exception)), finally running on both paths, and rethrow.
try/catch/finallyis not implemented, so any error handling typed into the REPL fails outright.evaluateAst()has noNode\Stmt\TryCatchbranch, so it falls through to the catch-all atsrc/Functions/evaluation.php:286.This is probably the most valuable of the missing statement types: exception handling is ordinary PHP that users will reach for constantly, and
throwalready works (features/repl/throw_expressions.feature), which makes the gap more surprising — you can throw but not catch.It also blocks acceptance coverage for a PHP 8.5 change: a missing trait became a catchable
Errorrather than a fatal, which can only be demonstrated withtry/catch.Needs
TryCatchandFinally_branches, covering multi-catch (catch (A|B $e)), catch without a variable (catch (Exception)),finallyrunning on both paths, and rethrow.