Req #33933 [Opn->Csd]: 64bit signed integer support on 32bit platforms
| From: | php at aornis dot com | Date: | Fri, 07 Feb 2020 20:25:58 +0000 |
| Subject: | Req #33933 [Opn->Csd]: 64bit signed integer support on 32bit platforms | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-225436@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=33933&edit=1
ID: 33933
User updated by: php at aornis dot com
Reported by: php at aornis dot com
Summary: 64bit signed integer support on 32bit platforms
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: Scripting Engine problem
Operating System: Any 32bit platform
PHP Version: 5.1.0b3
Block user comment: N
Private report: N
New Comment:
I filed this 15 years ago, it was a different time :) Closed.
Previous Comments:
------------------------------------------------------------------------
[2020-02-07 05:52:46] requinix@php.net
I think we can wontfix this: 64-bit is the norm, and bc/gmp are available to anyone who needs
numbers larger than their system supports.
------------------------------------------------------------------------
[2020-02-07 05:46:07] carusogabriel@php.net
Is this one still valid? Looks like it was already fixed: https://3v4l.org/76F5g.
------------------------------------------------------------------------
[2015-01-08 23:43:24] ajf@php.net
The bigints RFC would resolve this on 32-bit platforms: http://wiki.php.net/rfc/bigint
------------------------------------------------------------------------
[2005-07-31 01:33:14] php at aornis dot com
Description:
------------
Better support for 64bit integers would be very nice, for example when performing this operation:
$val = 0x1 << 32;
echo $val;
The value "1" is returned, due to the 32bit wrapping applied to the integer. Even when
using type casts to float or double it doesn't extend beyond 32bits.
An extra type such as Int64 would be very useful.
Reproduce code:
---------------
$val = 0x1 << 32;
echo $val."\n";
(float)$val = (float)0x1 << 32;
echo $val;
Expected result:
----------------
It should output "4294967296" for both
Actual result:
--------------
It outputs "1" due to 32bit wrapping
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=33933&edit=1