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();

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 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 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,

[PHP-DEV] call_user_func performance and dynamic code

2011-05-22 Thread Drak
I'd like to ask a question about call_user_func/_array performance and the use of runtime variables to call functions and methods from the PHP internals perspective. Many people have blogged about how:- $callable = array($object, $bar); call_user_func_array($callable, $args); is consider