error_clear_last
(PHP 7)
error_clear_last — Clear the most recent error
Description
void error_clear_last ( void )
Return Values
Clears the most recent errors, making it unable to be retrieved with error_get_last().
Examples
Example #1 An error_clear_last() example
<?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());
?>
The above example will output something similar to:
NULL
NULL
array(4) {
["type"]=>
int(8)
["message"]=>
string(21) "Undefined variable: b"
["file"]=>
string(9) "%s"
["line"]=>
int(6)
}
NULL
See Also
← debug_print_backtrace
error_get_last →
© 1997–2017 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com