Skip to Content
Mastering PHP 7
book

Mastering PHP 7

by Branko Ajzele
June 2017
Intermediate to advanced
536 pages
9h 49m
English
Packt Publishing
Content preview from Mastering PHP 7

Error

The Error class is the base class for internal PHP errors in PHP 7. Nearly all fatal and recoverable fatal errors in PHP 5.x now throw instances of the Error object, making themselves catchable via the try...catch blocks.

The Error class implements the Throwable interface, as per the following class synopsis:

Error implements Throwable {   /* Properties */   protected string $message ;   protected int $code ;   protected string $file ;   protected int $line ;   /* Methods */   public __construct (     [ string $message = ""      [, int $code = 0      [, Throwable $previous = NULL ]]]    )    final public string getMessage (void)    final public Throwable getPrevious (void)    final public mixed getCode (void)    final public string getFile (void) final public int getLine ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning PHP 7

Learning PHP 7

Antonio L Zapata (GBP)
Upgrading to PHP 5

Upgrading to PHP 5

Adam Trachtenberg

Publisher Resources

ISBN: 9781785882814Supplemental Content