PHP date_get_last_errors() Function

Example

Returns warnings and errors when parsing the date string:

<?php
date_create("aecubdjpoi%&&/");
print_r(date_get_last_errors());
?>

Running Example

Definition and Usage

The date_get_last_errors() function returns warnings/errors found when parsing the date string.

Syntax

date_get_last_errors();

Technical Details

Return Value: Returns an array containing error/warning information.
PHP Version: 5.3+