note 53967 added to function.mt-srand
| From: | wisp at exite-art dot com | Date: | Sun, 19 Jun 2005 07:15:10 +0000 |
| Subject: | note 53967 added to function.mt-srand | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-90641@lists.php.net to get a copy of this message | ||
having trouble using mt_rand..
tried the following:
for($n = 0; $n < 1000000; $n++) {
$i = mt_rand(1, 10);
}
and got the following reults:
1s: 199560
2s: 200233
3s: 200135
4s: 200095
5s: 199188
6s: 160
7s: 139
8s: 186
9s: 155
10's: 149
Tried this with many different seeds as well and got similar results.. now could this be caused by
my OS? (WinXP, SP2)
----
Manual Page -- http://www.php.net/manual/en/function.mt-srand.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53967
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53967&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53967&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53967&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53967&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+53967&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53967&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53967&report=yes
Search -- http://master.php.net/manage/user-notes.php