restore_error_handler

(PHP 4 >= 4.0.1, PHP 5, PHP 7, PHP 8)

restore_error_handler — 이전 오류 처리기 함수를 복원합니다.


설명

restore_error_handler(): bool

set_error_handler()를 사용하여 오류 처리기 함수를 변경한 후 이전 오류 처리기로 되돌리는 데 사용됩니다(내장 또는 사용자 정의 함수일 수 있음).


매개변수

이 함수에는 매개변수가 없습니다.


반환 값

이 함수는 항상 true를 반환합니다.


Examples

예제 #1 restore_error_handler() 예제

unserialize()로 인해 오류가 발생했는지 확인한 다음 원래 오류 처리기를 복원합니다.

                  
<?php
function unserialize_handler($errno, $errstr)
{
    echo "Invalid serialized value.\n";
}

$serialized = 'foo';
set_error_handler('unserialize_handler');
$original = unserialize($serialized);
restore_error_handler();
?>
                  
                

위의 예는 다음을 출력합니다.

Invalid serialized value.
                

기타