|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-03-03 14:12 UTC] pajoye@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 23:00:01 2025 UTC |
Description: ------------ crc32() function result differs on 32-bit and 64-bit platforms which break compatibility. there is very ugly workaround like using dechex(crc32()) but this means that all the code must be reviewed before migrating to any platform which is not 32bit. Even there is no unsigned integer in PHP, this function must return the same numeric result. And sure this buggy behavior must be well documented. Reproduce code: --------------- php -r ' echo crc32("platform independant") . "\n";' Expected result: ---------------- -858128794 Actual result: -------------- 3436838502