Re: [PHP-DEV] Constructor object instance dereferentiation

2011-05-23 Thread Jaroslav Hanslik
Dne 23.5.2011 3:23, Felipe Pena napsal(a): Hi, 2011/5/22 Matthew Weier O'Phinney One thing not on the RFC that I'm curious about: if the class defines __invoke(), would the following work? new MyClass()(); That would be particularly useful for implementing helper systems, which are quite

Re: [PHP-DEV] Constructor object instance dereferentiation

2011-05-23 Thread Jaroslav Hanslik
Dne 23.5.2011 3:23, Felipe Pena napsal(a): Hi, 2011/5/22 Matthew Weier O'Phinney One thing not on the RFC that I'm curious about: if the class defines __invoke(), would the following work? new MyClass()(); That would be particularly useful for implementing helper systems, which are quite

Re: [PHP-DEV] Constructor object instance dereferentiation

2011-05-22 Thread Felipe Pena
Hi, 2011/5/22 Matthew Weier O'Phinney > One thing not on the RFC that I'm curious about: if the class defines > __invoke(), would the following work? > >new MyClass()(); > > That would be particularly useful for implementing helper systems, which > are quite often one-off use cases. > > No,

Re: [PHP-DEV] Constructor object instance dereferentiation

2011-05-22 Thread Matthew Weier O'Phinney
On 2011-05-22, Ferenc Kovacs wrote: > --bcaec52be62721150704a3d8f926 > Content-Type: text/plain; charset=UTF-8 > > On Sun, May 22, 2011 at 6:18 AM, dukeofgaming wrote: > > I was wondering if object dereferentiation after constructor call is > > something that has been discussed already. This is,

Re: [PHP-DEV] Constructor object instance dereferentiation

2011-05-22 Thread dukeofgaming
On Sun, May 22, 2011 at 3:16 AM, Ferenc Kovacs wrote: > > > hi. > > it was already discussion, Felipe created an RFC and a patch, the responses > was all positive, so I think if nobody changed their mind, we could move > this from Under Discussion to Accepted/Implemented > as I said before, it wou

Re: [PHP-DEV] Constructor object instance dereferentiation

2011-05-22 Thread Ferenc Kovacs
On Sun, May 22, 2011 at 6:18 AM, dukeofgaming wrote: > Hi, > > I was wondering if object dereferentiation after constructor call is > something that has been discussed already. This is, being able to do > something like: > > new MyClass()->setSomething(); > > Instead of: > > $var = new MyClass();

[PHP-DEV] Constructor object instance dereferentiation

2011-05-21 Thread dukeofgaming
Hi, I was wondering if object dereferentiation after constructor call is something that has been discussed already. This is, being able to do something like: new MyClass()->setSomething(); Instead of: $var = new MyClass(); $var->setSomething(); Regards, David Vega