Categories
Posts

PHP 7 Exceptions and Errors

Davey Shafik on changes to exceptions in PHP7:

With PHP 7 errors and exceptions are undergoing major changes. For the first time, the PHP engine will start to emit exceptions instead of standard PHP errors for (previously) fatal, and catchable fatal errors. This means that we can now handle them much more gracefully with try…catch.

While I have mixed feelings about try…catch in general, I like the idea of being able to use it to catch more ( normally fatal ) errors.

Leave a Reply

Your email address will not be published. Required fields are marked *