Menu Home

date_get_last_errors

osbo.com | PHP | Functions | date_get_last_errors

Returns the warnings and errors

Syntax

date_get_last_errors ( void ) : array

Return

Returns array containing info about warnings and errors.

Examples

<?

$date = date_create("invalid");

$return = date_get_last_errors();

print_r($return);

?>
Array
(
    [warning_count] => 1
    [warnings] => Array
        (
            [6] => Double timezone specification
        )

    [error_count] => 1
    [errors] => Array
        (
            [0] => The timezone could not be found in the database
        )

)

PHP