Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45141 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62746 invoked from network); 30 Jul 2009 14:01:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jul 2009 14:01:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 83.243.58.133 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 83.243.58.133 mailout1.netbeat.de Linux 2.6 Received: from [83.243.58.133] ([83.243.58.133:51656] helo=mailout1.netbeat.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7B/BC-03589-3B7A17A4 for ; Thu, 30 Jul 2009 10:01:24 -0400 Received: (qmail 20026 invoked by uid 89); 30 Jul 2009 14:27:19 -0000 Received: from unknown (HELO ?192.168.1.102?) (johannes%schlueters.de@93.104.54.73) by mailout1.netbeat.de with ESMTPA; 30 Jul 2009 14:27:19 -0000 To: Guilherme Blanco Cc: PHP internals In-Reply-To: References: Content-Type: text/plain Date: Thu, 30 Jul 2009 16:01:15 +0200 Message-ID: <1248962475.4159.14.camel@goldfinger.johannes.nop> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Supporting ArrayObject in array_* functions From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Thu, 2009-07-30 at 00:08 -0300, Guilherme Blanco wrote: > What do you think about the possibility to support ArrayObject > instances in array_* functions? > If you all agreed on this, I can definately help to complete the > patch, but I need some initial guidance to finish at least the first > function. In general I'm for bringing Iterators/ArrayObject/.. on a line with arrays but please don't simply patch some functions but let's try to find a as consistent as possible global solution. Questions included there are of these kinds (just examples) - is that specific to ArrayObject or do we "need" interfaces like "Sortable" or "Shuffable" - What should stuff like aray_merge(ArrayObject, array) do - Should we do this globally? (should ldap_set_option() allow an ArrayObject as 3rd param?) Especially the latter shows that a proper solution might be not to patch individual functions but to introduce some form of abstraction from HashTables for "array operations" and then use that interface. Simply extending a few functions will end in a mess but looking around people seem to love these structures so improving them is good. johannes