Req #33933 [Com]: 64bit signed integer support

From: Date: Fri, 07 Feb 2020 05:46:07 +0000
Subject: Req #33933 [Com]: 64bit signed integer support
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225398@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 Comment by: carusogabriel@php.net Reported by: detonator316 at gmail dot com Summary: 64bit signed integer support 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: Is this one still valid? Looks like it was already fixed: https://3v4l.org/76F5g. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#225398) next »