You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When DateTime::createFromFormat() fails, Zend exposes DateTime::getLastErrors() (and the immutable variant) returning warning_count, warnings, error_count, errors. Frameworks use this for user-facing validation messages. This compiler has no static method and no last-error state.
Category
stdlibProblem
When
DateTime::createFromFormat()fails, Zend exposesDateTime::getLastErrors()(and the immutable variant) returningwarning_count,warnings,error_count,errors. Frameworks use this for user-facing validation messages. This compiler has no static method and no last-error state.php-src reference
ext/date/php_datetime.c—PHP_METHOD(DateTime, getLastErrors), global parse-error storageext/date/lib/parse_date.c— warning/error accumulation during format parseRepro (failure today)
true,error_count >= 1bin/vm.phpCall to undefined method DateTime::getLastErrors()Scope (this repo)
lib/VM/DateTimeSupport.php— thread-local or VM-context last-errors arraygetLastErrorson DateTime + DateTimeImmutablecreateFromFormatlowering (#4659)test/compliance/cases/stdlib/datetime_get_last_errors.phptDone when
createFromFormat,getLastErrors()array keys match Zend subset (warning_count,warnings,error_count,errors)./script/ci-fast.sh --filter datetime_get_last_errorsgreenRelated