Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46803 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13148 invoked from network); 19 Jan 2010 12:01:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jan 2010 12:01:44 -0000 Authentication-Results: pb1.pair.com header.from=johannes@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 83.243.58.133 as permitted sender) X-PHP-List-Original-Sender: johannes@php.net X-Host-Fingerprint: 83.243.58.133 mailout1.netbeat.de Linux 2.6 Received: from [83.243.58.133] ([83.243.58.133:46075] helo=mailout1.netbeat.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 13/20-11770-62F955B4 for ; Tue, 19 Jan 2010 07:01:44 -0500 Received: (qmail 7158 invoked by uid 89); 19 Jan 2010 12:10:54 -0000 Received: from unknown (HELO ?192.168.1.27?) (postmaster%schlueters.de@93.104.113.146) by mailout1.netbeat.de with ESMTPA; 19 Jan 2010 12:10:54 -0000 X-Originator: 9e51b244e0a38413ab6a9876e36ba9df To: Michael Wallner Cc: internals@lists.php.net In-Reply-To: <4F.56.22457.408955B4@pb1.pair.com> References: <4B54FC87.8070106@zend.com> <4F.56.22457.408955B4@pb1.pair.com> Content-Type: text/plain; charset="UTF-8" Organization: php.net Date: Tue, 19 Jan 2010 13:01:26 +0100 Message-ID: <1263902486.2365.16.camel@guybrush> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: function call chaining From: johannes@php.net (Johannes =?ISO-8859-1?Q?Schl=FCter?=) Hi, On Tue, 2010-01-19 at 12:31 +0100, Michael Wallner wrote: > On 01/19/2010 01:27 AM, Stanislav Malyshev wrote: > > Hi! > > > > I wrote a small patch that enables this kind of syntax in PHP: > > > > foo()(); I think that becomes hard to read quite easily. > I'd rather see two other things that are missing, support for > dynamic object and array de-referencing like > (new class)->method() and get_array()["index"]. For the latter - there's a patch by some user in the bug tracker, which I can't find right now. Having $foo[0]->bar(); and $foo()[0]; it might also make sense to allow more of these, like the proposed foo()() but other than such consistency I don't really like it .... johannes