note 36582 deleted from function.crc32 by nlopess

From: Date: Sun, 21 Jan 2007 15:52:17 +0000
Subject: note 36582 deleted from function.crc32 by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-122001@lists.php.net to get a copy of this message
Note Submitter: sandeep_k_ghosh at hotmail dot com ---- This function returns the unsigned crc32 value. I realized it's not very obvious from the current documentation. <?php /** * Function to compute the unsigned crc32 value. * PHP crc32 function returns int which is signed, so in order to get the correct crc32 value * we need to convert it to unsigned value. * * @param $str - String to compute the unsigned crc32 value. * @return $var - Unsinged inter value. */ function computeUnsignedCRC32($str){ sscanf(crc32($str), "%u", $var); return $var; } ?>

« previous php.notes (#122001) next »