svn: /phpdoc/en/trunk/reference/strings/functions/ crc32.xml

From: Date: Tue, 25 Aug 2015 01:15:28 +0000
Subject: svn: /phpdoc/en/trunk/reference/strings/functions/ crc32.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-13653@lists.php.net to get a copy of this message
cmb Tue, 25 Aug 2015 01:15:28 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=337619 Log: hash("crc32b", $str) is not necessarily equal to dechex(crc32($str)) Changed paths: U phpdoc/en/trunk/reference/strings/functions/crc32.xml Modified: phpdoc/en/trunk/reference/strings/functions/crc32.xml =================================================================== --- phpdoc/en/trunk/reference/strings/functions/crc32.xml 2015-08-25 00:20:41 UTC (rev 337618) +++ phpdoc/en/trunk/reference/strings/functions/crc32.xml 2015-08-25 01:15:28 UTC (rev 337619) @@ -52,7 +52,7 @@ <simpara> For a more portable solution you may also consider the generic <function>hash</function>. <code>hash("crc32b", $str)</code> will - return the same string as <code>dechex(crc32($str))</code>. + return the same string as <code>str_pad(dechex(crc32($str)), 8, '0', STR_PAD_LEFT)</code>. </simpara> </warning> </refsect1>

« previous php.doc.cvs (#13653) next »