note 79567 modified in function.crc32 by danbrown

From: Date: Thu, 06 Oct 2011 21:30:17 +0000
Subject: note 79567 modified in function.crc32 by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-183685@lists.php.net to get a copy of this message
This function returns the same int value on a 64 bit mc. like the crc32() function on a 32 bit mc. <?php function crcKw($num){ $crc = crc32($num); if($crc & 0x80000000){ $crc ^= 0xffffffff; $crc += 1; $crc = -$crc; } return $crc; } ?> --was-- // This function returns the same int value on a 64 bit mc. like the crc32() function on a 32 bit mc. function crcKw($num){ $crc = crc32($num); if($crc & 0x80000000){ $crc ^= 0xffffffff; $crc += 1; $crc = -$crc; } return $crc; } http://php.net/manual/en/function.crc32.php

« previous php.notes (#183685) next »