Re: RFC: mt_* functions
| From: | Jani Taskinen | Date: | Sat, 04 Aug 2001 23:30:30 +0000 |
| Subject: | Re: RFC: mt_* functions | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-62109@lists.php.net to get a copy of this message | ||
On Sat, 4 Aug 2001, Rasmus Lerdorf wrote:
>> On Sat, 4 Aug 2001, Rasmus Lerdorf wrote:
>> >based on their seeds. If I, as an application developer, distributes a
>> >regression test harness which tests my app with a specific seed expecting
>> >a specific sequence and the server my app runs on has switched rand() to
>> >use the mt_rand() algorithm my regression test will fail.
>>
>> So, if you always use mt_rand() you should be okay? Since the algorithm
>> for rand() might be different from system to system..?
>
>Sure, although rand() tends to be the same everywhere as well. At least
>on all the systems I care about it is the same. Linux, FreeBSD, OpenBSD
>and Solaris all seem to use the same algorithm.
Then why do some people have troubles with rand() on Solaris? :)
Or is it some specific version of it?
--Jani