Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48116 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82907 invoked from network); 27 Apr 2010 16:45:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Apr 2010 16:45:43 -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 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 unknown Solaris 10 (beta) Received: from [217.114.211.66] ([217.114.211.66:36273] helo=schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D3/8A-60649-6B417DB4 for ; Tue, 27 Apr 2010 12:45:42 -0400 Received: from localhost (ka.local [127.0.0.1]) by schlueters.de (Postfix) with SMTP id CEF7224245 for ; Tue, 27 Apr 2010 18:45:39 +0200 (CEST) Received: from [192.168.1.31] (ppp-93-104-47-38.dynamic.mnet-online.de [93.104.47.38]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by schlueters.de (Postfix) with ESMTPSA id 8122724244; Tue, 27 Apr 2010 18:45:39 +0200 (CEST) To: Etienne Kneuss Cc: internals Mailing List In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Tue, 27 Apr 2010 18:45:38 +0200 Message-ID: <1272386738.870.32.camel@guybrush> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] ArrayAccess::offsetGet not returning a ref From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) Hi, On Tue, 2010-04-27 at 10:17 +0200, Etienne Kneuss wrote: > it looks like the fact that ArrayAccess::offsetGet is not returning a > reference is a recurrent problem, I see basically 4 options: The main use case is some nested structure like $o = new ArrayObject(); /*...*/ $o[23][42] = "foobar"; right? > a) Ignore the issue, change nothing > > b) Rewrite offsetGet to return a ref, breaking BC > > c) Create a new ArrayAccess interface where it does return a ref > > d) Relax prototype checks so that both are allowed. If the above case is correct and due to me not liking references I wonder whether there is a way to for an option e) which adds support for this in some way to the engine. johannes