Re: note 24562 added to function.srand
| From: | Jesus M. Castagnetto | Date: | Wed, 21 Aug 2002 21:48:02 +0000 |
| Subject: | Re: note 24562 added to function.srand | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-35325@lists.php.net to get a copy of this message | ||
Ehem, microtime() returns a string and not a numeric
value. Re-read the manual page for that functions.
Your note has been removed
--- james@nowuk.net wrote:
> Ok, so calling srand a second time based on a value
> that is likely to be similar to the first one is a
> bad idea, but what about always calling it as:
>
> srand(microtime() * rand(10000, 2000000))
>
> If we've been called previously, the seed will be
> based on a presumably random value...
>
> Can anyone who knows what they're talking about make
> any comment?
> --
> http://www.php.net/manual/en/function.srand.php
>
http://master.php.net/manage/user-notes.php?action=edit+24562
>
http://master.php.net/manage/user-notes.php?action=delete+24562
>
http://master.php.net/manage/user-notes.php?action=reject+24562
>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
=====
--- Jesus M. Castagnetto <jmcastagnetto@php.net>
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com