Re: rand(), mt_rand() and limits
| From: | Leigh | Date: | Mon, 12 Jan 2015 00:26:29 +0000 |
| Subject: | Re: rand(), mt_rand() and limits | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-80391@lists.php.net to get a copy of this message | ||
On 11 January 2015 at 22:12, Andrea Faulds <ajf@ajf.me> wrote:
>
> * Get rid of rand(), srand() and getrandmax()
> * Rename mt_rand(), mt_srand() and mt_getrandmax() to rand(), srand(), and getrandmax() but
> add mt_* aliases for backwards-compatibility
Also, this breaks all code currently using rand() and srand(), as the
LCG and MT produce a different sequence of numbers for the same seed.
I can't judge how widely this is used, I don't expect it to be a lot,
but it's still something that has to be considered.