Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<ExamplesThrowable errors>
^Language ReferenceLast updated: Mon, 26 Oct 2026

Error Handling

Table of Contents

Errors are a normal part of the development and life cycle of an application. As such, PHP provides multiple ways to report and deal with errors.

PHP has two main mechanisms for reporting errors:

  • Throwable errors, which are further split into programming errors via the Error class hierarchy and recoverable errors via the Exception class hierarchy. These errors can be thrown with the throw keyword and caught with the catch keyword.

  • Diagnostic errors, which are classified into different severities.


<ExamplesThrowable errors>
^Language ReferenceLast updated: Mon, 26 Oct 2026