X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

PHP restore_exception_handler() Function


PHP Error Reference Complete PHP Error Reference

Definition and Usage

The restore_exception_handler() function restores the previous exception handler.

This function is used to restore the previous exception handler after changing it with the set_exception_handler() function.

This function always returns TRUE.

Syntax

restore_exception_handler()


Tips and Notes

Tip: The previous exception handler could be the built in exception handler or a user-defined function.


Example

<?php
restore_exception_handler();

throw new Exception('Uncaught Exception occured');
?>

The output of the code above should be something like this:

Fatal error: Uncaught exception 'Exception' with message
'Uncaught Exception occured' in C:\webfolder\test.php:4
Stack trace: #0 {main} thrown in C:\webfolder\test.php on line 4


PHP Error Reference Complete PHP Error Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook