|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2006-02-07 01:27 UTC] pajoye@php.net
  [2012-07-26 17:23 UTC] hholzgra@php.net
 
-Status:  Closed
+Status:  Wont fix
-Package: Feature/Change Request
+Package: *General Issues
  [2012-07-26 17:23 UTC] hholzgra@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 23:00:01 2025 UTC | 
Description: ------------ I noticed that crc32() function result is represented differently on 32-bit and 64-bit platforms. The problem is whithin crc32.c file, unsigned int crc = ~0; After actual crc32 calculations result is inverted and then casted to "long": RETVAL_LONG(~crc); Proposed patch: RETVAL_LONG(~ (long) crc); I tested it successfully on 64-bit linux and macosx, it works well. Reproduce code: --------------- <? echo crc32("platform independant") . "\n"; ?> Expected result: ---------------- I expect to see value -858128794 both on 32-bit and 64-bit platform. Actual result: -------------- On 64-bit platform i see 3436838502 On 32-bit -858128794