Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48107 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57765 invoked from network); 27 Apr 2010 09:14:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Apr 2010 09:14:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=daniel.egeberg@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=daniel.egeberg@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.215 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: daniel.egeberg@gmail.com X-Host-Fingerprint: 209.85.219.215 mail-ew0-f215.google.com Received: from [209.85.219.215] ([209.85.219.215:63831] helo=mail-ew0-f215.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D0/2B-30049-BDAA6DB4 for ; Tue, 27 Apr 2010 05:14:03 -0400 Received: by ewy7 with SMTP id 7so3353206ewy.11 for ; Tue, 27 Apr 2010 02:14:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=QUtNPKsD2DKqhIxHg55/UGvgfDviXYljJMgSsxW4DoQ=; b=VG0hJMnSY+q/+B7rlS/K7CC59i85QhabTiHre96OShGnNgqWRLSqyqXiBKl9JZ+nSw x36iiYPtTA1oSUTy6zUoebTHlj2IEStA+ov5XV8NC3WIuCbDUoGmfO9k1Z+9xgTyo0hZ oGNn74alhb18F/cGodS2rseuYI5pZsoiNmTio= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=REwbWgY9rL1wfIAWmObDDONjVWsy+FcdZMYc+S4aAtfoUonRQFzLfEi39kTaLHzFcp uakoj9BnjFLTXd/SBQItkL5HAB45Qci0C6SeUvVdAsxvS7M5o8thbeUeYgPEMBr4fbYI 5eLeyQAlgY4HkeNPcVtyiQ7o3M1GMn6VDsEFA= Received: by 10.213.68.129 with SMTP id v1mr2043143ebi.1.1272359640160; Tue, 27 Apr 2010 02:14:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.26.81 with HTTP; Tue, 27 Apr 2010 02:13:40 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Apr 2010 11:13:40 +0200 Message-ID: To: Peter Cowburn Cc: Etienne Kneuss , internals Mailing List Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] ArrayAccess::offsetGet not returning a ref From: daniel.egeberg@gmail.com (Daniel Egeberg) On Tue, Apr 27, 2010 at 10:51, Peter Cowburn wrote: > On 27 April 2010 09:17, Etienne Kneuss wrote: >> Hi, >> >> it looks like the fact that ArrayAccess::offsetGet is not returning a >> reference is a recurrent problem, I see basically 4 options: >> >> a) Ignore the issue, change nothing >> >> b) Rewrite offsetGet to return a ref, breaking BC > -1,000,000 >> >> c) Create a new ArrayAccess interface where it does return a ref >> >> d) Relax prototype checks so that both are allowed. > > Of the options presented, I think d) would be the best of the bunch. > Folks seem to expect the ability to get references so any solution > that gives them that would be better IMO than keeping the interface > as-is. Without having the technical insight in how it works internally, I would also say that from an end-user perspective, option (d) makes most sense. >> >> Personally, I believe that a fatal on such prototypes error is not >> warranted, so I'd prefer (d). >> >> What do you think would be the best option? Can you think of another? -- Daniel Egeberg