php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #43650 Objects implementing ArrayAccess don't work with array_* functions
Submitted: 2007-12-21 09:18 UTC Modified: 2011-04-08 21:05 UTC
Votes:13
Avg. Score:4.6 ± 0.8
Reproduced:12 of 12 (100.0%)
Same Version:3 (25.0%)
Same OS:4 (33.3%)
From: cweiske@php.net Assigned:
Status: Open Package: SPL related
PHP Version: 5.2.5 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-12-21 09:18 UTC] cweiske@php.net
Description:
------------
Objects of classes implementing ArrayAccess (e.g. ArrayObject) cannot be used with array_* functions like array_multisort. It would be cool if PHP would allow this.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-21 09:20 UTC] cweiske@php.net
(Feature request from http://bugs.php.net/bug.php?id=34849)
 [2011-04-08 21:05 UTC] jani@php.net
-Summary: SPL: Objects implementing ArrayAccess don't work with array_* functions +Summary: Objects implementing ArrayAccess don't work with array_* functions -Package: Feature/Change Request +Package: SPL related
 [2011-11-19 21:06 UTC] morrison dot levi at gmail dot com
Agree on this, even though you can make this work in other ways.  You can have a 
method that takes a function as a parameter and will call it with a reference (if 
applicable) to your data.  It still feels hackish when they can already access all 
my data.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC