© Andrew Beak 2017
Andrew BeakPHP 7 Zend Certification Study Guidehttps://doi.org/10.1007/978-1-4842-3246-0_11

11. Error Handling

Andrew Beak
(1)
Grafham, Cambridgeshire, UK
 
Error handling accounts for some of the biggest changes between PHP 5.6 and PHP 7.1 and it makes sense to address this important topic separately even though we have touched on it at relevant places elsewhere in this book.

Throwables

We’re going to be looking at the Error and Exception classes in this chapter. For now, all that you need to know is that they both implement the Throwable interface that was introduced in PHP 7.
Tip
The reason that PHP defined a new Error class that does not extend the Exception class was to maintain backward compatibility with PHP5.6 code.

The ...

Get PHP 7 Zend Certification Study Guide: Ace the ZCE 2017-PHP Exam now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.