note 21412 added to function.mt-rand
| From: | cluebie@php.net | Date: | Sun, 12 May 2002 02:35:05 +0000 |
| Subject: | note 21412 added to function.mt-rand | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-30495@lists.php.net to get a copy of this message | ||
The manual should say that you MUST call mt_srand() if you wish to consistently retrieve random
values with mt_rand(). While some servers will automagically use random seed others will not and
you may generate the same value over and over.
See the mt_srand() user notes on how to seed properly.
--
http://www.php.net/manual/en/function.mt-rand.php
http://master.php.net/manage/user-notes.php?action=edit+21412
http://master.php.net/manage/user-notes.php?action=delete+21412
http://master.php.net/manage/user-notes.php?action=reject+21412