Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23215 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51269 invoked by uid 1010); 9 May 2006 11:13:49 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 51254 invoked from network); 9 May 2006 11:13:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 May 2006 11:13:49 -0000 X-PHP-List-Original-Sender: jared.williams1@ntlworld.com X-Host-Fingerprint: 81.103.221.48 mta08-winn.ispmail.ntl.com Solaris 8 (1) Received: from ([81.103.221.48:39782] helo=mtaout02-winn.ispmail.ntl.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id AA/69-63885-C6970644 for ; Tue, 09 May 2006 07:13:49 -0400 Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com with ESMTP id <20060509111344.YHDN29040.mtaout02-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com>; Tue, 9 May 2006 12:13:44 +0100 Received: from win2ks ([82.3.16.111]) by aamtaout04-winn.ispmail.ntl.com with ESMTP id <20060509111344.LNB16086.aamtaout04-winn.ispmail.ntl.com@win2ks>; Tue, 9 May 2006 12:13:44 +0100 Reply-To: To: "'Tobias Schlitt'" , "'Marcus Boerger'" Cc: "'PHP Developers Mailing List'" Date: Tue, 9 May 2006 12:17:27 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 In-Reply-To: <44607553.5090509@schlitt.info> Thread-Index: AcZzV8KMeewMkyDcRbmqAR3Ai9Wr2wAAbF4g Message-ID: <20060509111344.LNB16086.aamtaout04-winn.ispmail.ntl.com@win2ks> Subject: RE: [PHP-DEV] array type hint and SPL array interfaces From: jared.williams1@ntlworld.com ("Jared Williams") References: <44607553.5090509@schlitt.info> > > Hi Marcus! > > I wondered, why PHP complains, if you have an array type hint > in a method prototype and provide an object to this method, > that implements the SPL interfaces to use objects as arrays. > I would expect that, if an object can be handled exactly like > an array, PHP should not complain, since the implementation > of the method would not notice the difference. > Or am I wrong? But the method may use an array_*() function, which would cause problems if they're handed an ArrayAccess implementation. So there is a difference. Jared