php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #38041 PHP should support 64 bit long integers
Submitted: 2006-07-08 21:12 UTC Modified: 2006-11-11 01:46 UTC
From: shailesh_bavadekar at yahoo dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 6* OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: shailesh_bavadekar at yahoo dot com
New email:
PHP Version: OS:

 

 [2006-07-08 21:12 UTC] shailesh_bavadekar at yahoo dot com
Description:
------------
PHP should support 64 bit long data type. Currently
there are two choices for integer arithmetic -

* 32 bit signed integer and
* 64 bit float.

In some cases the translation between these types
is handled automatically but the behavior is not consistent.
e.g. integers operands are automatically converted to
float, but integers represented as strings are not.

The main problem is - even if integers are seamlessly
converted to float, that only extends the range to
2^53. So there is really no way to handle integer values
between 2^53 and 2^64.

gmp extension is an option of course, but it is cumbersome
to use.

The lack of 64 bit long support causes incorrect behavior
elsewhere in the language - e.g. PHP SOAP extension cannot
accurately translate xsd:long data type to PHP.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-11 01:46 UTC] tony2001@php.net
Duplicate of FR #33933.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Nov 27 00:01:36 2024 UTC