php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #63989 ArrayIterator::usort method
Submitted: 2013-01-15 11:09 UTC Modified: 2017-09-21 08:54 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: franssen dot roland at gmail dot com Assigned:
Status: Open Package: SPL related
PHP Version: 5.3.20 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: franssen dot roland at gmail dot com
New email:
PHP Version: OS:

 

 [2013-01-15 11:09 UTC] franssen dot roland at gmail dot com
Description:
------------
Hi,

There is currently no "ArrayIterator::usort" method which assigns new keys to the elements (e.g. usort vs uasort function).

Also the current user defined sort methods (uasort, uksort) don't accept a valid callable as argument (e.g. a closure). Only a string works :(


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-21 08:54 UTC] cmb@php.net
> Also the current user defined sort methods (uasort, uksort) don't accept a
> valid callable as argument (e.g. a closure). Only a string works :(

Actually, general callables are supported, see <https://3v4l.org/Rv61G>. The
documentation is wrong.
 [2017-09-21 09:18 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=343115
Log: Document ArrayIterator::uasort() and ::uksort()

This partially fixes request #63989 and also integrates
user note 118260.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Nov 04 01:01:29 2024 UTC