On Fri, Nov 26, 2010 at 14:36, Felipe Pena <felipe...@gmail.com> wrote: > Hi all, > I'm here again to presents another proposal, which adds support for > instantiating a class and calling its methods and accessing its properties > on same command. > > Example: > > <?php > > class bar { > public $x = 'PHP'; > } > > class foo extends bar { > public function bar() { > return $this; > } > } > > var_dump(new foo()->bar()->x); // string(3) "PHP" > > ?> > > Other examples which describes the feature at > http://wiki.php.net/rfc/instance-method-call > > Thoughts?
I'm all for it, Felipe. Chaining like that would really come in handy in several situations of which I can think right off the top of my head even. -- </Daniel P. Brown> Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php