Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56684 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79617 invoked from network); 30 Nov 2011 18:51:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Nov 2011 18:51:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@googlemail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@googlemail.com X-Host-Fingerprint: 209.85.215.42 mail-lpp01m010-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:59418] helo=mail-lpp01m010-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/4B-17272-54B76DE4 for ; Wed, 30 Nov 2011 13:51:50 -0500 Received: by lami14 with SMTP id i14so374218lam.29 for ; Wed, 30 Nov 2011 10:51:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=GQnKMZjr5dffRSVou3/ahQ+2kaRD7kiBlOfTgkLQaHs=; b=n5O8WKC3VkquGVHcD61h1vxMFIQyLteY2pfVOKf5ZiH0wvQ1GLYZ9wglzBLLwFQ08t q7f3S5M7NqUEUB2FdTkCOyQanCqj62xXhlpNCSk97v5JqO2qBfJOXhUJn1TmEmXZdRo2 oivZ8LFDrnmvx0atIuXE2T2e8iQibrC2lIwVI= MIME-Version: 1.0 Received: by 10.152.132.39 with SMTP id or7mr2368967lab.14.1322679106801; Wed, 30 Nov 2011 10:51:46 -0800 (PST) Received: by 10.152.9.131 with HTTP; Wed, 30 Nov 2011 10:51:46 -0800 (PST) In-Reply-To: <4ED6713D.2050009@ralphschindler.com> References: <4ED6713D.2050009@ralphschindler.com> Date: Wed, 30 Nov 2011 19:51:46 +0100 Message-ID: To: Ralph Schindler Cc: internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] 5.4's New De-referencing plus assignment From: nikita.ppv@googlemail.com (Nikita Popov) Hi Ralph! This (in it's current form) doesn't look like a good idea to me. You are only handling yet another edge case. ($foo =3D $bar =3D new A)->bar() would again not work. If we really want this kind of (expr)-> syntax, then it should really accept *any* expr. But I am not quite sure whether this will work out easily because in this case we can't be sue that expr is an object (but maybe it'll be simple, I just don't know). Nikita On Wed, Nov 30, 2011 at 7:09 PM, Ralph Schindler wrote: > Hey all (Filipe), > > This was brought up in the thread "New dereferencing syntaxes in 5.4". > > I too think this would be beneficial: > > =A0$value =3D ($obj =3D new Foo)->produceAValue(); > > but the current parser (branch 5.4) doesn't have a rule for this. =A0I've > attached a quick/working patch, but I don't fully understand the > ramifications of such a patch. > > Can someone explain the drawbacks of increasing the "%expect n" for me? > > Would this many s/r require/benefit from a new expression grouping? > > More to the point, can we have this small change for 5.4? > > Thanks in advance. > -ralph > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php