PHP restore_exception_handler()関数
完全な PHP Error リファレンスマニュアル
定義と使用法
restore_exception_handler() 関数は、以前の例外ハンドラを復元します。
この関数は、set_exception_handler() 関数によって変更された後に、以前の例外ハンドラを復元するために使用されます。
この関数は常に TRUE を返します。
構文
restore_exception_handler()
ヒントと注釈
ヒント:以前の例外ハンドラは、組み込みの例外ハンドラまたはユーザー定義関数で構成されている可能性があります。
例
<?php
restore_exception_handler();
throw new Exception('Uncaught Exception occured');
?>
restore_exception_handler();
throw new Exception('Uncaught Exception occured');
?>
上記のコードの出力は次のとおりです。
Fatal error: Uncaught exception 'Exception' with message
'Uncaught Exception occured' in C:webfoldertest.php:4
Stack trace: #0 {main} thrown in C:webfoldertest.php on line 4
'Uncaught Exception occured' in C:webfoldertest.php:4
Stack trace: #0 {main} thrown in C:webfoldertest.php on line 4
完全な PHP Error リファレンスマニュアル その他の拡張機能