note 93797 added to function.crc32

From: Date: Wed, 30 Sep 2009 03:16:09 +0000
Subject: note 93797 added to function.crc32
Groups: php.notes 
Request: Send a blank email to php-notes+get-161160@lists.php.net to get a copy of this message
For those who want a more familiar return value for the function: function strcrc32($text) { $crc = crc32($text); if ($crc & 0x80000000) { $crc ^= 0xffffffff; $crc += 1; $crc = -$crc; } return $crc; } And to show the result in Hex string: function int32_to_hex($value) { $value &= 0xffffffff; return str_pad(strtoupper(dechex($value)), 8, "0", STR_PAD_LEFT); } ---- Server IP: 187.16.23.134 Probable Submitter: 189.27.160.100 ---- Manual Page -- http://www.php.net/manual/en/function.crc32.php Edit -- https://master.php.net/note/edit/93797 Del: integrated -- https://master.php.net/note/delete/93797/integrated Del: useless -- https://master.php.net/note/delete/93797/useless Del: bad code -- https://master.php.net/note/delete/93797/bad+code Del: spam -- https://master.php.net/note/delete/93797/spam Del: non-english -- https://master.php.net/note/delete/93797/non-english Del: in docs -- https://master.php.net/note/delete/93797/in+docs Del: other reasons-- https://master.php.net/note/delete/93797 Reject -- https://master.php.net/note/reject/93797 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#161160) next »