php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #61703 sort-array
Submitted: 2012-04-12 19:00 UTC Modified: 2012-04-13 00:33 UTC
From: sia88 at utexas dot edu Assigned:
Status: Not a bug Package: Arrays related
PHP Version: 5.3.10 OS: pc
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: sia88 at utexas dot edu
New email:
PHP Version: OS:

 

 [2012-04-12 19:00 UTC] sia88 at utexas dot edu
Description:
------------
---
From manual page: http://www.php.net/function.sort
---
I wanted to request a feature to the sort function. I noticed it did not have optional parameter to retain the keys of the array. Instead it re-writes them. why not add an optional 3rd boolean paramter to decide to retain keys in the original array or not?


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-04-12 19:12 UTC] admin at sinfocol dot org
The feature is already implemented in another function called asort.
 [2012-04-13 00:33 UTC] aharvey@php.net
-Status: Open +Status: Not a bug
 [2012-04-13 00:33 UTC] aharvey@php.net
What admin said.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 05:01:34 2025 UTC