php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #76516 shuffle() has a note about undefined sorted order
Submitted: 2018-06-22 04:33 UTC Modified: 2018-06-22 10:19 UTC
From: dharkness at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Arrays related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2018-06-22 04:33 UTC] dharkness at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.shuffle
---
This note should be removed unless equal values truly affect the shuffled order:

    If two members compare as equal, their relative order in the sorted array is undefined.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-22 04:59 UTC] requinix@php.net
-Package: Documentation problem +Package: Arrays related
 [2018-06-22 04:59 UTC] requinix@php.net
I checked the source back through PHP 4.0 and didn't see anything that would explain the note. Nothing obvious in the PHP 5 or 7 changelogs either. And the doc editor seems to be down so I can't check the page's edit history to see when the note was added.

So tentatively and probably yes, that doesn't need to be there.
 [2018-06-22 08:10 UTC] cmb@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2018-06-22 08:10 UTC] cmb@php.net
The note has been committed as part of the fix of bug #51229, but
is obviously nonsense for shuffle().
 [2018-06-22 10:18 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=345180
Log: Fix #76516: shuffle() has a note about undefined sorted order
 [2018-06-22 10:19 UTC] cmb@php.net
-Status: Verified +Status: Closed
 [2018-06-22 10:19 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-02-07 06:05 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=802fb7ce9fe7c5039fe83482079999e3ea148644
Log: Fix #76516: shuffle() has a note about undefined sorted order
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 11:01:29 2024 UTC