Home Menu

error_clear_last

Clear the most recent error

Syntax

error_clear_last ( void ) : void

Return

Clears the most recent errors, making it unable to be retrieved with error_get_last().

Examples

void

<?

echo $error;

print_r(error_get_last());

error_clear_last();

var_export(error_get_last());

?>
Array
(
    [type] => 8
    [message] => Undefined variable: error
    [file] => /home/user/public_html/index.php
    [line] => 3
)
NULL

Return

<?

echo $error;

print_r(error_get_last());

$return = error_clear_last();

var_export($return);

?>
Array
(
    [type] => 8
    [message] => Undefined variable: error
    [file] => /home/user/public_html/index.php
    [line] => 3
)
NULL

PHP

JesusBible
HTMLCSSJSPHPSVGMore
AboutTerms