#12312 [Opn]: array_mt_rand() ?
| From: | philip@php.net | Date: | Fri, 06 Jun 2003 22:33:05 +0000 |
| Subject: | #12312 [Opn]: array_mt_rand() ? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-41399@lists.php.net to get a copy of this message | ||
ID: 12312
Updated by: philip@php.net
Reported By: lramsey at crystalorb dot net
Status: Open
Bug Type: Feature/Change Request
Operating System: Linux 2.4.3
PHP Version: 4.0.6
New Comment:
Why not just rewrite array_rand() and shuffle() to instead use
mt_srand()? It is "superior" after all... And seeding takes place
automatically as of PHP 4.2.0
Previous Comments:
------------------------------------------------------------------------
[2003-06-06 14:54:06] sniper@php.net
There is no 'array_shuffle()' and shuffle() uses rand too.
Having array_mt_rand() is quite good idea.
------------------------------------------------------------------------
[2003-05-31 10:37:15] andrey@php.net
Does array_shuffle() solve this?
------------------------------------------------------------------------
[2001-07-22 21:23:20] lramsey at crystalorb dot net
As the mt_rand() algorithim creates better random numbers than rand(),
would it be possible to include in future releases of the language to
include a version of array_rand() that uses mt_rand()?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=12312&edit=1