#32211 [Opn->Csd]: Hexadecimal integer value above 32-bit doesn't convert to float
| From: | vrana@php.net | Date: | Thu, 31 Mar 2005 15:58:28 +0000 |
| Subject: | #32211 [Opn->Csd]: Hexadecimal integer value above 32-bit doesn't convert to float | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969367770@lists.php.net to get a copy of this message | ||
ID: 32211
Updated by: vrana@php.net
Reported By: osp at tinet dot org
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: Linux and Windows XP
PHP Version: 4.3.10
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Added explanatory example in the docs.
Previous Comments:
------------------------------------------------------------------------
[2005-03-07 08:10:58] derick@php.net
Documentation is wrong here...
------------------------------------------------------------------------
[2005-03-07 02:24:35] osp at tinet dot org
Description:
------------
Hexadecimal values that don't fit a 32-bit size are not converted to
float as specified on documentation:
"Integer overflow
If you specify a number beyond the bounds of the integer type, it will
be interpreted as a float instead."
This works for decimal numbers, but not hexadecimal.
Reproduce code:
---------------
<?php
$myvalue = 0x100000000; // 33-bit value
//$myvalue = 4294967296;
echo $myvalue."<br>";
var_dump( $myvalue );
?>
Expected result:
----------------
4294967296
float(4294967296)
(0x100000000)
Actual result:
--------------
2147483647
int(2147483647)
(0x7FFFFFFF)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32211&edit=1