Exception Hierarchy
PHP exceptions follow a hierarchy. Throwable ├── Error └── Exception
Both Error and Exception implement the Throwable interface.
Example
Section titled “Example”try {throw new Exception("Example");} catch (Throwable $e) {echo $e->getMessage();}