Re: [PHP6] Merging rand and mt_rand()
| From: | Andrea Faulds | Date: | Sun, 23 Feb 2014 21:53:00 +0000 |
| Subject: | Re: [PHP6] Merging rand and mt_rand() | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-72777@lists.php.net to get a copy of this message | ||
On 23 Feb 2014, at 20:22, Stas Malyshev <smalyshev@sugarcrm.com> wrote:
> I would say anybody who relies on RNG producing preset numbers is asking
> for trouble. If you need mock RNG, mock it out, don't rely on
> undocumented properties of the system one.
> But then again, refactoring and unifying RNGs is not very urgent thing
> and a good candidate to put in a major version.
What? PRNGs guarantee that for a given seed they will always produce the same sequence. All sorts of
things do and should rely on this.
--
Andrea Faulds
http://ajf.me/