From 2cfb583beabd8bb61b278cc2e0cad148e881d355 Mon Sep 17 00:00:00 2001 From: Maxim Klenin Date: Sat, 24 Oct 2026 23:44:28 +0300 Subject: [PATCH] Mention PHP_INT_MIN in numeric string conversion rules The numeric string conversion rules currently mention only PHP_INT_MAX when describing the limits of the int type. Add PHP_INT_MIN to both the numeric string and leading numeric string conversion rules to clarify that the lower bound also applies. --- language/types/numeric-strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/language/types/numeric-strings.xml b/language/types/numeric-strings.xml index ff787af10544..c7dd1a6341bd 100644 --- a/language/types/numeric-strings.xml +++ b/language/types/numeric-strings.xml @@ -64,8 +64,8 @@ var_dump("2E1" == "020"); // true, "2E1" is 2 * (10 ^ 1), or 20 If the string is numeric, resolve to an int if the string is an integer numeric string and fits into the limits of the int type limits (as defined by - PHP_INT_MAX), otherwise resolve to a - float. + PHP_INT_MIN and PHP_INT_MAX), + otherwise resolve to a float. @@ -74,8 +74,8 @@ var_dump("2E1" == "020"); // true, "2E1" is 2 * (10 ^ 1), or 20 is one, resolve to an int if the leading part of the string is an integer numeric string and fits into the limits of the int type limits (as defined by - PHP_INT_MAX), otherwise resolve to a - float. + PHP_INT_MIN and PHP_INT_MAX), + otherwise resolve to a float. Additionally an error of level E_WARNING is raised.