Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48685 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83306 invoked from network); 8 Jun 2010 10:41:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jun 2010 10:41:39 -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:58459] helo=schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/A0-13782-65E1E0C4 for ; Tue, 08 Jun 2010 06:41:27 -0400 Received: from localhost (ka.local [127.0.0.1]) by schlueters.de (Postfix) with SMTP id 8222126B5F for ; Tue, 8 Jun 2010 12:41:23 +0200 (CEST) Received: from [192.168.1.33] (ppp-93-104-32-138.dynamic.mnet-online.de [93.104.32.138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by schlueters.de (Postfix) with ESMTPSA id 15E3626B5D; Tue, 8 Jun 2010 12:41:23 +0200 (CEST) To: Jacob Oettinger Cc: Felipe Pena , internals In-Reply-To: <2C70277E-0442-49B8-AD0B-E9F12ED7B42C@oettinger.dk> References: <2C70277E-0442-49B8-AD0B-E9F12ED7B42C@oettinger.dk> Content-Type: text/plain; charset="UTF-8" Date: Tue, 08 Jun 2010 12:41:21 +0200 Message-ID: <1275993681.2243.10.camel@guybrush> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Array Dereferencing From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Tue, 2010-06-08 at 12:23 +0200, Jacob Oettinger wrote: > Would it be equally simple to allow the syntax below? > > $result = new ResultMaker()->getIt(); does this mean $result = new (ResultMaker()->getIt()); or $result = (new ResultMaker())->getIt(); I assume the later, but that is non-obvious as we allow $result = new $class(); > and > > $resultOfFunc = returnsFunc()(); Having closures this might make sense. (While I don't want to debug code like $foo("bar")[42]->do()("it"); ) Oh and obviously +1 on the original patch. ;-) johannes