Re: [RFC] Array Dereferencing

From: Date: Tue, 08 Jun 2010 10:23:11 +0000
Subject: Re: [RFC] Array Dereferencing
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-48684@lists.php.net to get a copy of this message
Hi This is great. Would it be equally simple to allow the syntax below? $result = new ResultMaker()->getIt(); and $resultOfFunc = returnsFunc()(); I think would add consistency because it would allow direct operations on any returned value. I agree that it is not the most reader friendly code. Jacob On 07/06/2010, at 18.58, Felipe Pena wrote: > Hi all, > I just edited the RFC page [1] about array dereferencing as now we have a > patch for such. > > RFC page: http://wiki.php.net/rfc/functionarraydereferencing > > The patch is simple, it just required to change the grammar file. I also > added some tests in the patch. > > Any objection? Thought? Improvements? > > Thanks. > > -- > Regards, > Felipe Pena

« previous php.internals (#48684) next »