error_clear_last
(PHP 7, PHP 8)
error_clear_last — 清除最近一次错误
说明
error_clear_last(): void
返回值
清除最近一次错误,使它无法通过 error_get_last() 获取。
范例
示例 #1 error_clear_last() 例子
<?php
var_dump(error_get_last());
error_clear_last();
var_dump(error_get_last());
@$a = $b;
var_dump(error_get_last());
error_clear_last();
var_dump(error_get_last());
?>
以上例程的输出类似于:
NULL NULL array(4) { ["type"]=> int(8) ["message"]=> string(21) "Undefined variable: b" ["file"]=> string(9) "%s" ["line"]=> int(6) } NULL

User Contributed Notes
There are no user contributed notes for this page.
备份地址:http://www.lvesu.com/blog/php/function.error-clear-last.php