php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23189 ksort() doesn't work on numeric arrays
Submitted: 2003-04-13 18:00 UTC Modified: 2003-04-13 18:28 UTC
From: wom dot bat at gmx dot net Assigned:
Status: Not a bug Package: Arrays related
PHP Version: 4.3.1 OS: Windows XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: wom dot bat at gmx dot net
New email:
PHP Version: OS:

 

 [2003-04-13 18:00 UTC] wom dot bat at gmx dot net
If I try to sort a numeric array using ksort(), nothing happens, the array doesn't get sorted at all.
sort() works perfect, though - the array gets sorted, but the index associations aren't kept, of course.
As the documentation doesn't say that ksort() only works with associative arrays, I guess this is likely to be a bug...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-13 18:04 UTC] wom dot bat at gmx dot net
arrgh... I guess I'm a little exhausted. close this one, please
 [2003-04-13 18:28 UTC] edink@php.net
As requested.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 10:01:33 2025 UTC