mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Refined string to int/float rules. #48496
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@281858 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
8d2863cf56
commit
2a2a9368dd
1 changed files with 6 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.19 $ -->
|
||||
<!-- $Revision: 1.20 $ -->
|
||||
<sect1 xml:id="language.types.string">
|
||||
<title>Strings</title>
|
||||
|
||||
|
@ -797,9 +797,11 @@ $str[strlen($str)-1] = 'e';
|
|||
</simpara>
|
||||
|
||||
<simpara>
|
||||
The <type>string</type> will be evaluated as a <type>float</type> if it
|
||||
contains any of the characters '.', 'e', or 'E'. Otherwise, it will be
|
||||
evaluated as an <type>integer</type>.
|
||||
If the <type>string</type> does not contain any of the characters '.', 'e',
|
||||
or 'E' and implied numeric value fits into integer type limits (as defined by
|
||||
<constant>PHP_INT_MAX</constant>), the <type>string</type> will be evaluated
|
||||
as an <type>integer</type>. In all other cases it will be evaluated as a
|
||||
<type>float</type>.
|
||||
</simpara>
|
||||
|
||||
<para>
|
||||
|
|
Loading…
Reference in a new issue