Re: [RFC] new foo()->bar()

From: Date: Sat, 05 Nov 2011 20:04:43 +0000
Subject: Re: [RFC] new foo()->bar()
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-56078@lists.php.net to get a copy of this message
On 26 November 2010 19:36, Felipe Pena <felipensp@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? Bump. What's the current status on this? It would be nice to this teeny little patch in for 5.4.0 if possible. > > -- > Regards, > Felipe Pena >

« previous php.internals (#56078) next »