mirror of
https://github.com/php/php-src.git
synced 2025-08-17 22:48:57 +02:00
- #36306, crc32() function result differs on 32-bit and 64-bit platforms
This commit is contained in:
parent
a3b941642c
commit
f3e11a705c
2 changed files with 9 additions and 1 deletions
|
@ -38,7 +38,7 @@ PHP_NAMED_FUNCTION(php_if_crc32)
|
|||
for (len += nr; nr--; ++p) {
|
||||
CRC32(crc, *p);
|
||||
}
|
||||
RETVAL_LONG(~crc);
|
||||
RETVAL_LONG(~ (long) crc);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
|
8
ext/standard/tests/strings/bug36306.phpt
Normal file
8
ext/standard/tests/strings/bug36306.phpt
Normal file
|
@ -0,0 +1,8 @@
|
|||
--TEST--
|
||||
Bug #36306 crc32() 64bit
|
||||
--FILE--
|
||||
<?php
|
||||
echo crc32("platform independant") . "\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
-858128794
|
Loading…
Add table
Add a link
Reference in a new issue