From 03168466d673843ff4339bf8c5f762f4442e2760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A6=E7=94=B0=20=E6=86=B2=E5=A4=AA=E9=83=8E?= Date: Sat, 4 Apr 2026 12:10:44 +0900 Subject: [PATCH] Add missing 8.0.0 changelog for datetime functions no longer returning false In PHP 7.x, several datetime functions returned `false` on parameter parsing failure. PHP 8.0 changed this to throw `TypeError` instead (per RFC: Consistent type errors for internal functions). This changelog entry was already documented for `DateTimeZone::listIdentifiers`/`timezone_identifiers_list`, but was missing from the following functions: - `date()` - `gmdate()` - `localtime()` - `getdate()` - `date_parse()` - `date_parse_from_format()` - `date_sun_info()` Functions that still return `false` from their own logic (e.g. `strtotime()`, `mktime()`, `date_create()`) are not included, as the parameter parsing change is not observable in their return types. The issue also requests reverting the return value description to mention `false`, but the old text was inaccurate (non-numeric strings were coerced to `0`, not rejected) and was intentionally removed in GH-2130. Closes #5460 --- reference/datetime/functions/date-parse-from-format.xml | 7 +++++++ reference/datetime/functions/date-parse.xml | 7 +++++++ reference/datetime/functions/date-sun-info.xml | 7 +++++++ reference/datetime/functions/date.xml | 7 +++++++ reference/datetime/functions/getdate.xml | 7 +++++++ reference/datetime/functions/gmdate.xml | 7 +++++++ reference/datetime/functions/localtime.xml | 7 +++++++ 7 files changed, 49 insertions(+) diff --git a/reference/datetime/functions/date-parse-from-format.xml b/reference/datetime/functions/date-parse-from-format.xml index a0da7f93996a..03f6ddc11842 100644 --- a/reference/datetime/functions/date-parse-from-format.xml +++ b/reference/datetime/functions/date-parse-from-format.xml @@ -123,6 +123,13 @@ ignored. + + 8.0.0 + + This function no longer returns &false; on failure, but throws a + TypeError instead. + + 7.2.0 diff --git a/reference/datetime/functions/date-parse.xml b/reference/datetime/functions/date-parse.xml index f2c33570228f..9d1ba88928e7 100644 --- a/reference/datetime/functions/date-parse.xml +++ b/reference/datetime/functions/date-parse.xml @@ -124,6 +124,13 @@ + + 8.0.0 + + This function no longer returns &false; on failure, but throws a + TypeError instead. + + 7.2.0 diff --git a/reference/datetime/functions/date-sun-info.xml b/reference/datetime/functions/date-sun-info.xml index 6b9a781ee1d7..8f7421e487c5 100644 --- a/reference/datetime/functions/date-sun-info.xml +++ b/reference/datetime/functions/date-sun-info.xml @@ -154,6 +154,13 @@ + + 8.0.0 + + This function no longer returns &false; on failure, but throws a + TypeError instead. + + 7.2.0 diff --git a/reference/datetime/functions/date.xml b/reference/datetime/functions/date.xml index 8d7b375b05ad..fc567b043ecc 100644 --- a/reference/datetime/functions/date.xml +++ b/reference/datetime/functions/date.xml @@ -81,6 +81,13 @@ + + 8.0.0 + + This function no longer returns &false; on failure, but throws a + TypeError instead. + + 8.0.0 diff --git a/reference/datetime/functions/getdate.xml b/reference/datetime/functions/getdate.xml index 8e433bcad9f4..caa862d223d1 100644 --- a/reference/datetime/functions/getdate.xml +++ b/reference/datetime/functions/getdate.xml @@ -128,6 +128,13 @@ + + 8.0.0 + + This function no longer returns &false; on failure, but throws a + TypeError instead. + + 8.0.0 diff --git a/reference/datetime/functions/gmdate.xml b/reference/datetime/functions/gmdate.xml index 9468fc66c0d0..b9d295412d87 100644 --- a/reference/datetime/functions/gmdate.xml +++ b/reference/datetime/functions/gmdate.xml @@ -58,6 +58,13 @@ + + 8.0.0 + + This function no longer returns &false; on failure, but throws a + TypeError instead. + + 8.0.0 diff --git a/reference/datetime/functions/localtime.xml b/reference/datetime/functions/localtime.xml index c2abc514e4b4..7030b381ec60 100644 --- a/reference/datetime/functions/localtime.xml +++ b/reference/datetime/functions/localtime.xml @@ -124,6 +124,13 @@ + + 8.0.0 + + This function no longer returns &false; on failure, but throws a + TypeError instead. + + 8.0.0