Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49218 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12358 invoked from network); 6 Aug 2010 15:24:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Aug 2010 15:24:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.21 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.21 smtp1.ist.utl.pt Linux 2.6 Received: from [193.136.128.21] ([193.136.128.21:50873] helo=smtp1.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F6/65-21239-1492C5C4 for ; Fri, 06 Aug 2010 11:24:50 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.ist.utl.pt (Postfix) with ESMTP id 96EC0700E8AC for ; Fri, 6 Aug 2010 16:24:46 +0100 (WEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp1.ist.utl.pt ([127.0.0.1]) by localhost (smtp1.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id 6yxccEH28WOf for ; Fri, 6 Aug 2010 16:24:46 +0100 (WEST) Received: from mail2.ist.utl.pt (mail.ist.utl.pt [IPv6:2001:690:2100:1::8]) by smtp1.ist.utl.pt (Postfix) with ESMTP id 62EF8700E85D for ; Fri, 6 Aug 2010 16:24:46 +0100 (WEST) Received: from damnation.dulce.lo.geleia.net (52.152.108.93.rev.vodafone.pt [93.108.152.52]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id 4F6B02007E62 for ; Fri, 6 Aug 2010 16:24:46 +0100 (WEST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: internals@lists.php.net References: <1272386738.870.32.camel@guybrush> <4C599C17.5050505@smashlabs.com> <4C5B3B1F.9090905@sugarcrm.com> <4C5C1AA6.2010902@smashlabs.com> <4C5C2139.8040800@smashlabs.com> Date: Fri, 06 Aug 2010 16:24:22 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_IST?= Message-ID: In-Reply-To: <4C5C2139.8040800@smashlabs.com> User-Agent: Opera Mail/10.60 (Win32) Subject: Re: [PHP-DEV] ArrayAccess::offsetGet not returning a ref From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") On Fri, 06 Aug 2010 15:50:33 +0100, Ralph Schindler wrote: > The attached patch is the suggested fix. I made this against master on > github. > In my opinion, it would make more sense, as was already suggested before, to require the return to be passed by reference only if the prototype specifies it should be passed by reference. This could be argued to be a form of return contravariance. As a bonus, it would be consistent with the "pass_rest_by_reference" flag check: if (proto->common.pass_rest_by_reference && !fe->common.pass_rest_by_reference) { return 0; } //if (fe->common.return_reference != proto->common.return_reference) { if (proto->common.return_reference && !fe->common.return_reference) { return 0; } -- Gustavo Lopes