Req #43650 [Com]: Objects implementing ArrayAccess don't work with array_* functions

From: Date: Sun, 27 Dec 2020 06:01:48 +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-231267@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: cameron7 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: nm re: previous post, looks like it's ArrayIterator I was looking for :) Previous Comments: ------------------------------------------------------------------------ [2020-12-27 05:50:39] cameron7 at gmail dot com Use case: For example, I think it might be pretty cool if stream_select allowed ArrayAccess objects to be passed as arguments. ------------------------------------------------------------------------ [2011-11-19 21:06:41] 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. ------------------------------------------------------------------------ [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

« previous php.bugs (#231267) next »