Cannot use try without catch or finally
Description
Try command have catch and finally clauses. While both are optional, they can’t be omitted both at the same time.
Example
<?php
try {}
?>
Alternatives
- Add a catch clause.
- Add a finally clause.
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
Try command have catch and finally clauses. While both are optional, they can’t be omitted both at the same time.
<?php
try {}
?>