#38041 [Opn]: PHP should support 64 bit long integers

From: Date: Tue, 18 Jul 2006 14:31:40 +0000
Subject: #38041 [Opn]: PHP should support 64 bit long integers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-99574@lists.php.net to get a copy of this message
 ID:          38041
 Updated by:  derick@php.net
 Reported By: shailesh_bavadekar at yahoo dot com
 Status:      Open
 Bug Type:    Feature/Change Request
-PHP Version: 5.1.4
+PHP Version: 6*
 New Comment:

This is planned for PHP 6:
http://www.php.net/~derick/meeting-notes.html#add-a-64bit-integer



Previous Comments:
------------------------------------------------------------------------

[2006-07-08 21:12:03] 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.




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38041&edit=1


Thread (3 messages)

« previous php.bugs (#99574) next »