Req #33933 [Opn]: 64bit signed integer support on 32bit platforms
Edit report at https://bugs.php.net/bug.php?id=33933&edit=1
ID: 33933
Updated by: requinix@php.net
Reported by: detonator316 at gmail dot com
-Summary: 64bit signed integer support
+Summary: 64bit signed integer support on 32bit platforms
Status: Open
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 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.
Previous Comments:
------------------------------------------------------------------------
[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] detonator316 at gmail 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
Thread (5 messages)