When I do a crc32
call on a 32 bit PHP system (PHP_INT_SIZE
is 4), the resulting integer value can be negative. How can I get the correct modulo value from the number, regardless if I am on a 32 or 64 bit system?
function checksumChar($str) {
if(PHP_INT_SIZE > 4) {
return crc32($str) % 26;
} else {
// ???
}
}