Exception Class
The Exception class is the base class for all user-defined exceptions.
It provides useful methods for debugging and handling errors.
Example
Section titled “Example”try {throw new Exception("Custom exception");} catch (Exception $e) {echo $e->getMessage();}