Re: rand(), mt_rand() and limits
| From: | Jordi Boggiano | Date: | Sun, 11 Jan 2015 23:56:41 +0000 |
| Subject: | Re: rand(), mt_rand() and limits | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-80387@lists.php.net to get a copy of this message | ||
Overall it's a good plan IMO and it would clean things up for sure. On the other hand if we don't remove old docs it will just make the docs pages even more complex since the docs for rand() will highly depend on which PHP version is used.
On 11/01/2015 22:12, Andrea Faulds wrote:
* Make mt_srand() and srand() do nothing and produce a deprecation noticeThat is the only point with which I disagree. Looking at http://3v4l.org/FLHBV we see that while indeed across PHP versions the result has not always been the same, it generally is, and especially within one given version setting a seed means you get predictable results. This has benefits in some cases like fixtures generation where it might not be important if the output changes when you upgrade PHP, but you don't want entirely different fixtures every single time. Obviously if we could guarantee the algo won't change it would be even better. Bottom line is I think it's important to have the ability to set the seed yourself. Cheers -- Jordi Boggiano @seldaek - http://nelm.io/jordi