Re: [RFC] new foo()->bar()
| From: | Julien Pauli | Date: | Mon, 29 Nov 2010 14:59:09 +0000 |
| Subject: | Re: [RFC] new foo()->bar() | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-50695@lists.php.net to get a copy of this message | ||
Care should be taken in the case of new myClass()->foo() just creates
an object to call a method but a static method would be more efficient
here.
However, well used (fluent interface for exemple) make me think +1 for
that patch.
J.Pauli
On Mon, Nov 29, 2010 at 12:40 PM, Felipe Pena <felipensp@gmail.com> wrote:
> Hi Dmitry,
>
> 2010/11/29 Dmitry Stogov <dmitry@zend.com>
>
>> Hi Felipe,
>
>
>> I'm wondered it works out of the box with so small patches :)
>>
>> However, both patches introduce new parser conflicts and it would be grate
>> to avoid them.
>>
>>
> I will check if there is any way to avoid it.
>
>
>> Also the patches need to be checked for memory leaks in case of exceptions
>> thrown from constructor and chained function(s).
>>
>
> Yes, I already did several tests to check this.
>
>
>> It also probably makes sense to add array deference chaining e.g. new
>> Foo()[] (just for language consistency).
>>
>>
> Hmm, looks good to me. :)
>
>
> Thanks.
>
> --
> Regards,
> Felipe Pena
>