Menu Home

restore_exception_handler

osbo.com | PHP | Functions | restore_exception_handler

Restores the previously defined exception handler function

Syntax

restore_exception_handler ( void ) : bool

Return

This function always returns TRUE.

Examples

<?

function exception_handler_1(Exception $e)
{
    echo '[' . __FUNCTION__ . '] ' . $e->getMessage();
}

function exception_handler_2(Exception $e)
{
    echo '[' . __FUNCTION__ . '] ' . $e->getMessage();
}

set_exception_handler('exception_handler_1');
set_exception_handler('exception_handler_2');

restore_exception_handler();

throw new Exception('This triggers the first exception handler...');

?>
[exception_handler_1] This triggers the first exception handler...

PHP