Re: function call chaining

From: Date: Tue, 19 Jan 2010 17:42:57 +0000
Subject: Re: function call chaining
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-46817@lists.php.net to get a copy of this message
On 19.01.2010, at 18:39, Rasmus Lerdorf wrote: > I don't mind the foo()() syntax, especially now that we have closures. > But people are right, we have a longstanding feature request for > $foo()[0] as well, so if we start down this path of adding chaining, we > should do that one as well and see if any others make sense. > > I do think the syntax is a bit ugly, but I also think it is clear what > it does and doesn't obscure/mislead the semantics of the call the way > the (new foo)->bar() suggestion does. +1 regards, Lukas Kahwe Smith mls@pooteeweet.org

« previous php.internals (#46817) next »