Req #43650 [Com]: Objects implementing ArrayAccess don't work with array_* functions
| From: | morrison dot levi at gmail dot com | Date: | Sat, 19 Nov 2011 21:06:42 +0000 |
| Subject: | Req #43650 [Com]: Objects implementing ArrayAccess don't work with array_* functions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-165366@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=43650&edit=1
ID: 43650
Comment by: morrison dot levi at gmail dot com
Reported by: cweiske@php.net
Summary: Objects implementing ArrayAccess don't work with
array_* functions
Status: Open
Type: Feature/Change Request
Package: SPL related
PHP Version: 5.2.5
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2007-12-21 09:20:02] cweiske@php.net
(Feature request from http://bugs.php.net/bug.php?id=34849)
------------------------------------------------------------------------
[2007-12-21 09:18:07] 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.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=43650&edit=1