#19110 [Opn->Dup]: ksort. not properly sorting array
| From: | nohn@php.net | Date: | Mon, 26 Aug 2002 16:18:57 +0000 |
| Subject: | #19110 [Opn->Dup]: ksort. not properly sorting array | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-17875@lists.php.net to get a copy of this message | ||
ID: 19110
Updated by: nohn@php.net
Reported By: matt@usrlocal.com
-Status: Open
+Status: Duplicate
Bug Type: Arrays related
Operating System: Solaris 8
PHP Version: 4.2.2
New Comment:
Are you running Solaris 8 on Sparc 64Bit? In this case it seems to be a
duplicate to bug #17449. Please try
http://snaps.php.net/php4-latest.tar.gz.
Previous Comments:
------------------------------------------------------------------------
[2002-08-26 12:13:53] matt@usrlocal.com
I am currently setting up an array based on a timestamp from the
system. So, I would have an array similiar to the following....
$event[1030251600] => Array(title => "Foo, Time => "Bar");
$event[1028329200] => Array(title => "Foo1", Time =>"Bar2");
$event[1028934000] => Array(title => "Foo2", Time =>"Bar3");
When I do a ksort($event, SORT_NUMERIC), I would expect this array to
be sorted by the timestamp key value becoming.....
$event[1028329200] => Array(title => "Foo1", Time =>"Bar2");
$event[1028934000] => Array(title => "Foo2", Time =>"Bar3");
$event[1030251600] => Array(title => "Foo, Time => "Bar");
It does in 4.1.2 but when we upgraded to 4.2.2, the array no longer
sorts. We get the values from the array exactly how we had the array
originally.
Matt Patterson
matt@usrlocal.com
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19110&edit=1