#30912 [NEW]: array_multisort was broken

From: Date: Fri, 26 Nov 2004 14:44:18 +0000
Subject: #30912 [NEW]: array_multisort was broken
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-69486@lists.php.net to get a copy of this message
From: bolk at hitv dot ru Operating system: Linux RedHat PHP version: 4.3.10RC1 PHP Bug Type: Unknown/Other Function Bug description: array_multisort was broken Description: ------------ array_multisort was broken Reproduce code: --------------- $rel2 = array(17, 100, 100, 100, 100, 100, 100, 100, 17, 17, 17, 17, 17); $rel = array('a','b', 'c', 'd', 'e', 'f', 'g', 'h', 'x','y','z','xx','ww'); array_multisort ($rel2, SORT_NUMERIC, SORT_DESC, $rel, SORT_REGULAR ); print_r($rel2); Expected result: ---------------- Array ( [0] => 100 [1] => 100 [2] => 100 [3] => 100 [4] => 100 [5] => 100 [6] => 100 [7] => 17 [8] => 17 [9] => 17 [10] => 17 [11] => 17 [12] => 17 ) Actual result: -------------- Array ( [0] => 17 [1] => 100 [2] => 100 [3] => 100 [4] => 100 [5] => 100 [6] => 100 [7] => 100 [8] => 17 [9] => 17 [10] => 17 [11] => 17 [12] => 17 ) -- Edit bug report at http://bugs.php.net/?id=30912&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30912&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30912&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30912&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30912&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30912&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30912&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30912&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30912&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30912&r=support Expected behavior: http://bugs.php.net/fix.php?id=30912&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30912&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30912&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30912&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30912&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30912&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30912&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30912&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30912&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30912&r=mysqlcfg

« previous php.bugs (#69486) next »