From 2849936da1a0315e4d0c32511b9870a793638359 Mon Sep 17 00:00:00 2001 From: Anshu Jain Date: Tue, 13 Jan 2026 22:45:00 +0530 Subject: [PATCH 1/2] Docs: clarify intval() behavior with scientific notation overflow --- reference/var/functions/intval.xml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/reference/var/functions/intval.xml b/reference/var/functions/intval.xml index 77fe1d944910..5ac126abd036 100644 --- a/reference/var/functions/intval.xml +++ b/reference/var/functions/intval.xml @@ -160,14 +160,23 @@ echo intval(true), PHP_EOL; // 1 - &reftitle.notes; - - - The base parameter has no effect unless the - value parameter is a string. - - - + &reftitle.notes; + + + The base parameter has no effect unless the + value parameter is a string. + + + + + When converting strings that contain scientific notation (for example, + "42.42e42"), intval() may return + PHP_INT_MAX due to integer overflow. This occurs + when the parsed numeric value exceeds the maximum integer size supported + by the platform. + + + &reftitle.seealso; From 91fee983a4c84c37a70aac78909650f0b6f00a20 Mon Sep 17 00:00:00 2001 From: Anshu Jain Date: Thu, 15 Jan 2026 00:00:45 +0530 Subject: [PATCH 2/2] docs: clarify is_numeric support for scientific notation strings --- reference/var/functions/is-numeric.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/reference/var/functions/is-numeric.xml b/reference/var/functions/is-numeric.xml index 4633d8d3d8b5..e3230f5895f9 100644 --- a/reference/var/functions/is-numeric.xml +++ b/reference/var/functions/is-numeric.xml @@ -68,6 +68,17 @@ + + &reftitle.notes; + + + Strings containing numbers in scientific notation (for example, + "1e3" or "42e2") are considered + numeric by is_numeric. + + + + &reftitle.examples;