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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Mon Apr 29 01:01:30 2024 UTC