(PHP 5, PHP 7)
restore_exception_handler — 锟街革拷之前锟斤拷锟斤拷锟斤拷锟斤拷斐o拷锟斤拷锟斤拷锟斤拷锟�
锟斤拷使锟斤拷 set_exception_handler() 锟侥憋拷锟届常锟斤拷锟斤拷锟斤拷之锟襟,此猴拷锟斤拷锟斤拷锟斤拷 锟斤拷锟节伙拷原之前锟斤拷锟届常锟斤拷锟斤拷锟斤拷锟�(锟斤拷锟斤拷锟斤拷锟斤拷锟矫的伙拷锟斤拷也锟斤拷锟斤拷锟斤拷锟矫伙拷锟斤拷锟斤拷锟斤拷暮锟斤拷锟�)锟斤拷
锟矫猴拷锟斤拷锟斤拷锟角凤拷锟斤拷 TRUE
锟斤拷
Example #1 restore_exception_handler() 锟斤拷锟斤拷
<?php
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...