|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37033 dechex returns 64-bit hex value
Submitted: 2006-04-10 19:36 UTC Modified: 2006-04-10 19:49 UTC
From: mr dot wiseman at gmail dot com Assigned:
Status: Not a bug Package: Math related
PHP Version: 5.1.2 OS: Ubuntu Breezy on AMD64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: mr dot wiseman at gmail dot com
New email:
PHP Version: OS:


 [2006-04-10 19:36 UTC] mr dot wiseman at gmail dot com
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:

$a = 0;
echo dechex(~$a);


Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-10 19:49 UTC]
You understand wrongly... php's integer size follows the systems integer size.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Aug 13 09:05:44 2022 UTC