The set_exception_handler() function sets a user-defined function to handle all uncaught exceptions.
< ?php |
The output of the code above should be something like this:
Exception: Uncaught Exception occurred |
In the code above there was no "catch" block. Instead, the top level exception handler triggered. This function should be used to catch uncaught exceptions.