php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #52247 more precise head description of array_rand()
Submitted: 2010-07-04 19:27 UTC Modified: 2010-08-10 03:32 UTC
From: flyingmana at googlemail dot com Assigned: philip (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2010-07-04 19:27 UTC] flyingmana at googlemail dot com
Description:
------------
At the moment there stands 
"array_rand — Pick one or more random entries out of an array"

But, it does not return the elements how someone (for example me) would think.
It returns the keys of the elements.

I know, at the return type description it is more precise, but the head should also left no misunderstandings.

So i would propose following head description

"array_rand — Pick one or more random entries out of an array and return there Keys"


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-10 03:31 UTC] philip@php.net
Automatic comment from SVN on behalf of philip
Revision: http://svn.php.net/viewvc/?view=revision&revision=302055
Log: Clarified (in the description) that entry keys are returned. Closes PHP bug #52247
 [2010-08-10 03:32 UTC] philip@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: philip
 [2010-08-10 03:32 UTC] philip@php.net
A close call, but I determined that the title should remain simple and instead 
updated the functions description to include this information. Thanks for the bug 
report, the fix will show up this upcoming Friday.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 01:00:01 2026 UTC