Error Class (PHP 7)
PHP 7 introduced the Error class which represents internal PHP errors.
It allows developers to catch fatal errors using try-catch blocks.
Example
Section titled “Example”try {throw new Error("Something went wrong");} catch (Error $e) {echo $e->getMessage();}