Php-function-restore-error-handler
提供:Dev Guides
PHP-関数restore_error_handler()
構文
bool restore_error_handler ( void );
定義と使い方
この関数は、set_error_handler()を使用してエラーハンドラー関数を変更した後に使用され、以前のエラーハンドラー(組み込み関数またはユーザー定義関数)に戻ります。
パラメーター
Sr.No | Parameter & Description |
---|---|
1 |
void NA |
戻り値
この関数は常にTRUEを返します。
例
以下は、この機能の使用法です-
<?php
function unserialize_handler($errno, $errstr) {
echo "Invalid hello value.\n";
}
$hello = 'abc';
set_error_handler('unserialize_handler');
$original = unserialize($hello);
restore_error_handler();
?>
これは、次の結果を生成します-
Invalid hello value.