note 101564 added to function.mt-rand
| From: | RobinLeffmann at osu1 dot php dot net | Date: | Sat, 25 Dec 2010 14:14:01 +0000 |
| Subject: | note 101564 added to function.mt-rand | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-175203@lists.php.net to get a copy of this message | ||
Fast, pseudo-random binary data generation using mt_rand():
<?php
function rnd_bin( $length )
{
while( @$c++ * 16 < $length )
@$tmp .= md5( mt_rand(), true );
return substr( $tmp, 0, $length );
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 83.227.160.33
----
Manual Page -- http://www.php.net/manual/en/function.mt-rand.php
Edit -- https://master.php.net/note/edit/101564
Del: integrated -- https://master.php.net/note/delete/101564/integrated
Del: useless -- https://master.php.net/note/delete/101564/useless
Del: bad code -- https://master.php.net/note/delete/101564/bad+code
Del: spam -- https://master.php.net/note/delete/101564/spam
Del: non-english -- https://master.php.net/note/delete/101564/non-english
Del: in docs -- https://master.php.net/note/delete/101564/in+docs
Del: other reasons-- https://master.php.net/note/delete/101564
Reject -- https://master.php.net/note/reject/101564
Search -- https://master.php.net/manage/user-notes.php