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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
33 + 2 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu May 16 00:01:33 2024 UTC