[doc-en] master: Mention PHP_INT_MIN in numeric string conversion rules (#6014)
| From: | Maxim Klenin via GitHub | Date: | Sun, 25 Oct 2026 10:26:00 +0000 |
| Subject: | [doc-en] master: Mention PHP_INT_MIN in numeric string conversion rules (#6014) | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-23890@lists.php.net to get a copy of this message | ||
Author: Maxim Klenin (kleninmaxim)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-10-25T11:25:57+01:00
Commit: https://github.com/php/doc-en/commit/df7a8d34320b0f519dbbb62139c8a8edfa506cea
Raw diff: https://github.com/php/doc-en/commit/df7a8d34320b0f519dbbb62139c8a8edfa506cea.diff
Mention PHP_INT_MIN in numeric string conversion rules (#6014)
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.
Changed paths:
M language/types/numeric-strings.xml
Diff:
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 <type>string</type> is numeric, resolve to an <type>int</type>
if
the <type>string</type> is an integer numeric string and fits into the
limits of the <type>int</type> type limits (as defined by
- <constant>PHP_INT_MAX</constant>), otherwise resolve to a
- <type>float</type>.
+ <constant>PHP_INT_MIN</constant> and
<constant>PHP_INT_MAX</constant>),
+ otherwise resolve to a <type>float</type>.
</simpara>
</listitem>
<listitem>
@@ -74,8 +74,8 @@ var_dump("2E1" == "020"); // true, "2E1" is 2 * (10
^ 1), or 20
is one, resolve to an <type>int</type> if the leading part of the
<type>string</type> is an integer numeric string and fits into the
limits of the <type>int</type> type limits (as defined by
- <constant>PHP_INT_MAX</constant>), otherwise resolve to a
- <type>float</type>.
+ <constant>PHP_INT_MIN</constant> and
<constant>PHP_INT_MAX</constant>),
+ otherwise resolve to a <type>float</type>.
Additionally an error of level <constant>E_WARNING</constant> is raised.
</simpara>
</listitem>