> Both function families are the same in syntax & returning, only the
> algorithm is different. I.e.: the semantics is the same. The algorithm - if
> correct - shouldn't bother, and shouldn't be the concern of the programmer,
> but rather the system maintainer (specific cases excluded, but than you
> leave the high-level of PHP, and go to low-level implementation issues.).

But they are different in that each will produce a deterministic sequence
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.

This is somewhat like saying that we should make crypt() just be an alias
for md5() since md5() is a better algorithm.  The fact that it is better
is rather irrelevant since the output of the algorithm itself is sometimes
important.  Many times you can swap crypt() for md5(), but many times you
can't.  Same goes for rand() and mt_rand().


PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to