#33933 [NEW]: 64bit signed integer support

From: Date: Sat, 30 Jul 2005 23:33:16 +0000
Subject: #33933 [NEW]: 64bit signed integer support
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-82728@lists.php.net to get a copy of this message
From: detonator316 at gmail dot com Operating system: Any 32bit platform PHP version: 5.1.0b3 PHP Bug Type: Feature/Change Request Bug description: 64bit signed integer support 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 bug report at http://bugs.php.net/?id=33933&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33933&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33933&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33933&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33933&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33933&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33933&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33933&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33933&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33933&r=support Expected behavior: http://bugs.php.net/fix.php?id=33933&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33933&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33933&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33933&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33933&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33933&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33933&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33933&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33933&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33933&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33933&r=mysqlcfg

« previous php.bugs (#82728) next »