note 104261 added to function.crc32

From: Date: Sat, 04 Jun 2011 10:31:59 +0000
Subject: note 104261 added to function.crc32
Groups: php.notes 
Request: Send a blank email to php-notes+get-180247@lists.php.net to get a copy of this message
I`d like to make a note on this post: /*-------------------------------------*/ <?php echo crc32('example')+4294967296; ?> gives you the same result as the CRC32() function in MySQL (>=4.1) "SELECT CRC32('example')" ....... /*-------------------------------------*/ This is actually wrong and works just for some strings, do not use this. crc32() php and mysql functions both return the same results. Use php sprintf() or printf() rather than echo() and read manual carefully. ---- Server IP: 77.88.252.46 Probable Submitter: 46.119.0.157 ---- Manual Page -- http://www.php.net/manual/en/function.crc32.php Edit -- https://master.php.net/note/edit/104261 Del: integrated -- https://master.php.net/note/delete/104261/integrated Del: useless -- https://master.php.net/note/delete/104261/useless Del: bad code -- https://master.php.net/note/delete/104261/bad+code Del: spam -- https://master.php.net/note/delete/104261/spam Del: non-english -- https://master.php.net/note/delete/104261/non-english Del: in docs -- https://master.php.net/note/delete/104261/in+docs Del: other reasons-- https://master.php.net/note/delete/104261 Reject -- https://master.php.net/note/reject/104261 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#180247) next »