Mô tả
Hàm restore_error_handler() khôi phục trình xử lý lỗi trước đó. Được dùng sau khi thay đổi trình xử lý lỗi bằng set_error_handler(), để quay lại trình xử lý trước (có thể là built-in hoặc do người dùng định nghĩa).
Cú pháp
restore_error_handler()
Tham số
NA − Không có tham số.
Giá trị trả về
Luôn trả về TRUE.
Ví dụ
<?php
function unserialize_handler($errno, $errstr) {
echo "Custom error: Invalid hello value.\n";
}
$hello = 'pqrs';
set_error_handler('unserialize_handler');
$original = unserialize($hello);
restore_error_handler();
?>Kết quả
Custom error: Invalid hello value.