Re: mt_rand() - the same forever?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 6, 2008 at 1:53 PM, Eric Butera <eric.butera@xxxxxxxxx> wrote:
> On Sun, Oct 5, 2008 at 2:25 PM, Janek <j-sz@xxxxx> 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.
>

Thanks, that settles it. I think I will use the second idea from
Jochem or something like that.

Janek

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux