#46280 [Opn->Bgs]: uasort bug
| From: | johannes@php.net | Date: | Tue, 14 Oct 2008 21:42:20 +0000 |
| Subject: | #46280 [Opn->Bgs]: uasort bug | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-129695@lists.php.net to get a copy of this message | ||
ID: 46280
Updated by: johannes@php.net
Reported By: goodfriends0092004 at yahoo dot com
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: windows
PHP Version: 5.2.6
New Comment:
I guess you're report is about 'a'=>1 not being the last element
anymore, but as the values are the same the order is "random" depending
on the sort implementation.
Previous Comments:
------------------------------------------------------------------------
[2008-10-12 12:49:43] goodfriends0092004 at yahoo dot com
Description:
------------
i found a bug of uasort function
Reproduce code:
---------------
$x = array(1,1,1,1,1,1,1,'a'=>1);
uasort($x,create_function('$a,$b', 'return 0;'));
var_dump($x);
Expected result:
----------------
array
5 => int 1
6 => int 1
'a' => int 1
4 => int 1
3 => int 1
1 => int 1
2 => int 1
0 => int 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46280&edit=1