DateTime::getLastErrors

date_get_last_errors

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

DateTime::getLastErrors -- date_get_last_errorsReturns the warnings and errors

Description

Object-oriented style

public static DateTime::getLastErrors(): array|false

Procedural style

date_get_last_errors(): array|false

Like DateTimeImmutable::getLastErrors() but works with DateTime.

Parameters

This function has no parameters.

Return Values

Returns array containing info about warnings and errors, or false if there are neither warnings nor errors.

See Also