(PHP 5 >= 5.3.0, PHP 7, PHP 8)
DateTime::getLastErrors -- date_get_last_errors — Returns the warnings and errors
Object-oriented style
Procedural style
Like DateTimeImmutable::getLastErrors() but works with DateTime.
This function has no parameters.
Returns array containing info about warnings and errors, or false
if there
are neither warnings nor errors.