Bug #12848 Updated: asort-SORT_NUMERIC inconsistent with non numeric values

From: Date: Sun, 21 Oct 2001 05:51:13 +0000
Subject: Bug #12848 Updated: asort-SORT_NUMERIC inconsistent with non numeric values
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-68584@lists.php.net to get a copy of this message
ID: 12848 Updated by: sniper Reported By: kzi@gmx.net Old Status: Open Status: Closed Bug Type: Arrays related Operating System: win98 PHP Version: 4.0.6 New Comment: Can not reproduce with PHP 4.1.0RC1. --Jani Previous Comments: ------------------------------------------------------------------------ [2001-08-19 18:57:49] kzi@gmx.net If asort() is used with the sort flag SORT_NUMERIC and the values ar non numeric, the sort order of those values should remain unchanged in principle. But in arrays with few of such non numeric items (app. < 10), the first item is generally moved to the bottom, while in arrays with more items, one element from somewhere in the middle is moved to the top. example: $q = array(1=>'A',2=>'B',3=>'C',4=>'D',5=>'E'); asort($q,SORT_NUMERIC); produces the value sequence B,C,D,E,A ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12848&edit=1

« previous php.dev (#68584) next »