Re: mt_rand() - the same forever?
| From: | Eric Butera | Date: | Mon, 06 Oct 2008 11:53:15 +0000 |
| Subject: | Re: mt_rand() - the same forever? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-281470@lists.php.net to get a copy of this message | ||
On Sun, Oct 5, 2008 at 2:25 PM, Janek <j-sz@o2.pl> wrote:
> I wonder whether I can rely on the stability of mt_srand() and
> mt_rand(). I want them to generate the same sequence for a fixed seed,
> regardless of PHP version. Do you think I can trust it?
> Janek
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
A while ago I saw on internals where someone was talking about why
their random numbers weren't giving the same response using the same
seed anymore after upgrading. The dev's said a random number is a
random number and should never be relied upon to give the same result,
ever. That may have been a different function, but I'm sure that
mindset would persist across all random functions.