From 2a2a9368dde0a7c76ab2d3983e0c78807545fd39 Mon Sep 17 00:00:00 2001 From: Richard Quadling Date: Tue, 9 Jun 2009 09:31:40 +0000 Subject: [PATCH] Refined string to int/float rules. #48496 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@281858 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/types/string.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/language/types/string.xml b/language/types/string.xml index a514d7023e..c11e77ea78 100644 --- a/language/types/string.xml +++ b/language/types/string.xml @@ -1,5 +1,5 @@ - + Strings @@ -797,9 +797,11 @@ $str[strlen($str)-1] = 'e'; - The string will be evaluated as a float if it - contains any of the characters '.', 'e', or 'E'. Otherwise, it will be - evaluated as an integer. + If the string does not contain any of the characters '.', 'e', + or 'E' and implied numeric value fits into integer type limits (as defined by + PHP_INT_MAX), the string will be evaluated + as an integer. In all other cases it will be evaluated as a + float.