Re: Use of php_mt_rand() rather than php_rand()
| From: | Rowan Collins | Date: | Wed, 16 Jul 2014 17:56:34 +0000 |
| Subject: | Re: Use of php_mt_rand() rather than php_rand() | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-75594@lists.php.net to get a copy of this message | ||
Yasuo Ohgaki wrote (on 16/07/2014):
The only BC issue I can think of is game that expects the same pseudo random sequences. These apps may use mt_srand() to get fixed random sequences and adjust their apps if it is needed. This is acceptable BC for new releases. IMO.Do you propose making rand() a synonym for mt_rand()? If so, wouldn't it make sense for srand() to become a synonym for mt_srand()? Or are you saying that there are functions other than rand() which can currently be seeded by srand(), and these would be affected by mt_srand() instead? If so, that seems like a pretty subtle change to document and publicise.