PHP 8.5.0 Alpha 1 available for testing

Voting

: seven minus four?
(Example: nine)

The Note You're Voting On

mail at tristansmis dot nl
18 years ago
I used the abs value of this function on a 32-bit system. When porting the code to a 64-bit system I’ve found that the value is different. The following code has the same outcome on both systems.
<?php

$crc
= abs(crc32($string));
if(
$crc & 0x80000000){
$crc ^= 0xffffffff;
$crc += 1;
}

/* Old solution
* $crc = abs(crc32($string))
*/

?>

<< Back to user notes page

To Top