note 91107 added to function.array-rand
| From: | theultramage at gmail dot com | Date: | Mon, 25 May 2009 20:09:02 +0000 |
| Subject: | note 91107 added to function.array-rand | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-155966@lists.php.net to get a copy of this message | ||
Note that as of 5.2.10, the statistical glitch described by Reinoud Elhorst's post
(http://www.php.net/manual/en/function.array-rand.php#74406) is fixed - and so after 9 years,
array_rand's algorithm again preserves the order of keys from the input. If you want a random
order, just shuffle the result.
For those interested in the details, go to http://bugs.php.net/bug.php?id=48224 and read the
html document linked to in the bugreport.
----
Server IP: 69.147.83.197
Probable Submitter: 85.248.66.209
----
Manual Page -- http://www.php.net/manual/en/function.array-rand.php
Edit -- https://master.php.net/note/edit/91107
Del: integrated -- https://master.php.net/note/delete/91107/integrated
Del: useless -- https://master.php.net/note/delete/91107/useless
Del: bad code -- https://master.php.net/note/delete/91107/bad+code
Del: spam -- https://master.php.net/note/delete/91107/spam
Del: non-english -- https://master.php.net/note/delete/91107/non-english
Del: in docs -- https://master.php.net/note/delete/91107/in+docs
Del: other reasons-- https://master.php.net/note/delete/91107
Reject -- https://master.php.net/note/reject/91107
Search -- https://master.php.net/manage/user-notes.php