Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46567 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79922 invoked from network); 29 Dec 2009 05:37:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Dec 2009 05:37:59 -0000 Authentication-Results: pb1.pair.com header.from=ceo@l-i-e.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ceo@l-i-e.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain l-i-e.com designates 67.139.134.202 as permitted sender) X-PHP-List-Original-Sender: ceo@l-i-e.com X-Host-Fingerprint: 67.139.134.202 o2.hostbaby.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from [67.139.134.202] ([67.139.134.202:3823] helo=o2.hostbaby.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A4/BF-26502-7B5993B4 for ; Tue, 29 Dec 2009 00:37:59 -0500 Received: (qmail 53765 invoked by uid 98); 29 Dec 2009 05:38:03 -0000 Received: from localhost by o2.hostbaby.com (envelope-from , uid 1013) with qmail-scanner-2.05 (clamdscan: 0.88.7/10227. Clear:RC:1(127.0.0.1):. Processed in 0.067943 secs); 29 Dec 2009 05:38:03 -0000 Received: from localhost (HELO l-i-e.com) (127.0.0.1) by localhost with SMTP; 29 Dec 2009 05:38:03 -0000 Received: from webmail (SquirrelMail authenticated user ceo@l-i-e.com) by www.l-i-e.com with HTTP; Mon, 28 Dec 2009 23:38:03 -0600 (CST) Message-ID: <3485.98.193.1262065083.squirrel@www.l-i-e.com> In-Reply-To: <78.83.26502.F1DD83B4@pb1.pair.com> References: <78.83.26502.F1DD83B4@pb1.pair.com> Date: Mon, 28 Dec 2009 23:38:03 -0600 (CST) To: "Clint Priest" Cc: internals@lists.php.net User-Agent: Hostbaby Webmail MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [PHP-DEV] is_array on objects with ArrayAccess or Iterator implementations From: ceo@l-i-e.com ("Richard Lynch") On Mon, December 28, 2009 10:30 am, Clint Priest wrote: > Has there been any discussion or decision about whether is_array() > should return true for objects which implement ArrayAccess or is there > another function already available which checks for either being the > case? I really would prefer that is_array *not* return true unless something really is a PHP array datatype. I've had too much grief with psuedo-arrays from SimpleXML and/or SPL or whatever it is that didn't quite implement *everything* an array does, or didn't quite behave the way I expected with regards to various functions. Surely there can be some kind of is_a or instanceof or other operator that would be more appropriate than overloading the built-in is_array function. -- Some people ask for gifts here. I just want you to buy an Indie CD for yourself: http://cdbaby.com/search/from/lynch