PHP restore_error_handler() Function

The restore_error_handler() function restores the previous error handler. This function is used to restore the previous error handler after changing it with the set_error_handler() function.

Example -

The above code will output something like this:

Tip:

The previous error handler could be the built-in error handler or a user-defined error handler function.