The date_get_last_errors() function returns the warnings/errors found while parsing a date string.
PHP date_get_last_errors() Function has the following syntax.
date_get_last_errors();
PHP date_get_last_errors() Function returns an array that contains information about the errors/warnings.
Get the warnings and errors while parsing a date string
<?php
date_create("asdfasdfasdfa");
print_r(date_get_last_errors());
?>
The code above generates the following result.