php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #47518 Most sorting functions have no stability indicator
Submitted: 2009-02-27 08:21 UTC Modified: 2009-11-19 12:05 UTC
Votes:6
Avg. Score:4.0 ± 1.0
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
From: cweiske@php.net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cweiske@php.net
New email:
PHP Version: OS:

 

 [2009-02-27 08:21 UTC] cweiske@php.net
Description:
------------
The usort docs tell us:
"Note: If two members compare as equal, their order in the sorted array is undefined."

Other functions do not do that. The docs of every sorting function should state if the function is sort-stable or not.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-27 08:30 UTC] philip@php.net
Also consider its changelog:


4.1.0	 
A new sort algorithm was introduced. The cmp_function doesn't keep the 
original order for elements comparing as equal.
 [2009-11-19 12:05 UTC] vrana@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.


 [2009-11-19 12:05 UTC] svn@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&revision=290982
Log: Unstable (bug #47518)
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Jun 17 03:00:02 2026 UTC