#37033 [Opn->Bgs]: dechex returns 64-bit hex value
| From: | derick@php.net | Date: | Mon, 10 Apr 2006 19:49:47 +0000 |
| Subject: | #37033 [Opn->Bgs]: dechex returns 64-bit hex value | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-95560@lists.php.net to get a copy of this message | ||
ID: 37033
Updated by: derick@php.net
Reported By: mr dot wiseman at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Math related
Operating System: Ubuntu Breezy on AMD64
PHP Version: 5.1.2
New Comment:
You understand wrongly... php's integer size follows the systems
integer size.
Previous Comments:
------------------------------------------------------------------------
[2006-04-10 19:36:53] mr dot wiseman at gmail dot com
Description:
------------
The following code will print a 64-bit value on my 64-bit system. As
far as I understand all variables are guaranteed to be 32-bit in PHP?
Reproduce code:
---------------
<?php
$a = 0;
echo dechex(~$a);
?>
Expected result:
----------------
ffffffff
Actual result:
--------------
ffffffffffffffff
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37033&edit=1