Re: Proposal for php7 class method return

From: Date: Mon, 11 Jul 2016 19:56:27 +0000
Subject: Re: Proposal for php7 class method return
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-94477@lists.php.net to get a copy of this message
On 11 July 2016 at 21:51, Jesse Schalken <me@jesseschalken.com> wrote: > > does save the verbosity of repeating a variable name, and often saves a > variable altogether: > > $blah = new Blah(); > $blah->setFoo(1); > $blah->setBaz(2); > $this->setBlah($blah); > > > becomes > > $this->setBlah((new Blah()) > ->setFoo(1) > ->setBaz(2) > ); > > Right: to save one variable assignment you now have 3 function calls. I think I see your problem (if this is about performance) :-P Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

« previous php.internals (#94477) next »