From: jian at theorchard dot com
Operating system: Linux RHEL 5
PHP version: 5.3.1
PHP Bug Type: Feature/Change Request
Bug description: crc32() function result differs on 64-bit Linux platforms and
others
Description:
------------
According to bug# 36306, this issue should have been fixed. But I found
it not entirely fixed across all platforms.
crc32 is returning an unsigned integer on a 64-bit Linux platform. It
does return the signed integer from a 64-bit Windows platform as well as
32-bit Windows/Linux platforms.
I found PHP_INT_SIZE and PHP_INT_MAX constants have different values on
that 64-bit Linux server with values 8 and 9223372036854775807
respectively. They are 4 and 2147483647 on other 32-bit platforms and
64-bit Windows platform.
Reproduce code:
---------------
<? echo crc32("884385799717_1_1") . "\n"; ?>
Expected result:
----------------
I expect to see value -676770709 both on 32-bit and 64-bit platforms.
Actual result:
--------------
On 64-bit Linux platform I see 3618196587
On 64-bit Windows platform I see -676770709
On 32-bit platforms I see -676770709
--
Edit bug report at http://bugs.php.net/?id=51073&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51073&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51073&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51073&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51073&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=51073&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51073&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=51073&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=51073&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=51073&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=51073&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=51073&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=51073&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=51073&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51073&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51073&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51073&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=51073&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=51073&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=51073&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=51073&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=51073&r=mysqlcfg