#47518 [Opn]: Most sorting functions have no stability indicator

From: Date: Fri, 27 Feb 2009 08:30:50 +0000
Subject: #47518 [Opn]: Most sorting functions have no stability indicator
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1920@lists.php.net to get a copy of this message
ID: 47518 Updated by: philip@php.net Reported By: cweiske@php.net Status: Open Bug Type: Documentation problem PHP Version: Irrelevant New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2009-02-27 08:21:39] 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47518&edit=1

« previous php.doc.bugs (#1920) next »