June 2017
Intermediate to advanced
536 pages
9h 49m
English
Exceptions were originally introduced in PHP 5, which brought forth the OOP model as well. They remain pretty much unchanged throughout the time. Among significant changes was the one added by PHP 5.5, which added the finally block, and PHP 7, which added the possibility to use the | operator in order to catch multiple exception types via a single catch block.
Exception is the base class for all user exceptions in PHP 7. Same as Error, Exception implements the Throwable interface, as per the following class synopsis:
Exception implements Throwable { /* Properties */ protected string $message ; protected int $code ; protected string $file ; protected int $line ; /* Methods */ public __construct ( [ string $message = "" [, int $code ...Read now
Unlock full access