note 116384 deleted from function.rand by salathe
| From: | salathe@php.net | Date: | Fri, 02 Jan 2015 11:24:06 +0000 |
| Subject: | note 116384 deleted from function.rand by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-201308@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
If you need to call rand() over 32768 times, use mt_rand() instead.
Because rand() will return a repeated sequence every 32768 calls.
i.e.
$v[] = array();
for( $i=0; $i<100000; $i++ ){
$v[] = rand();
}
you will get an array that $v[n] equals to $v[n+32768]