Re: [PHP-DEV] [RFC] Re: [PHP-DEV] __invoke() weirdness

2009-01-06 Thread David Zülke
On 03.01.2009, at 15:47, Marcus Boerger wrote: However if that is the intention, then something we might want to look into in order to make it easier for those people is to fix something that propbably looks wrong to them. That is binding a closure to a property outside of the scope of the objec

Re: [PHP-DEV] [RFC] Re: [PHP-DEV] __invoke() weirdness

2009-01-04 Thread Kenan R Sulayman
Hi Johannes, foo = "foo";$o->foo(); //Example 1 $o->bar = function(){}; $o->bar(); //Example 2 ?> The example 1 must not work, because PHP tries to call $o->foo() as a function, but not $o->foo as description for the function. To make example 2 working, the declaration has to be cha

Re: [PHP-DEV] [RFC] Re: [PHP-DEV] __invoke() weirdness

2009-01-04 Thread Johannes Schlüter
Hi, On Sat, 2009-01-03 at 15:47 +0100, Marcus Boerger wrote: > > I'd say it would be good to concentrate on making 5.3 stable and then > > see how new features are accepted. If users really demand such a > > functionality, when using closures for "real life" development, we can > > still add it, b

Re: [PHP-DEV] [RFC] Re: [PHP-DEV] __invoke() weirdness

2009-01-03 Thread Marcus Boerger
Hello all, current state of the patch is attached. marcus Saturday, January 3, 2009, 3:47:44 PM, you wrote: > Hello Johannes, > Friday, January 2, 2009, 7:16:32 PM, you wrote: >> Hi, >> On Wed, 2008-12-31 at 17:38 +0100, Marcus Boerger wrote: >>> So far it is. Yet I as much as you do not l

Re: [PHP-DEV] [RFC] Re: [PHP-DEV] __invoke() weirdness

2009-01-03 Thread Marcus Boerger
Hello Johannes, Friday, January 2, 2009, 7:16:32 PM, you wrote: > Hi, > On Wed, 2008-12-31 at 17:38 +0100, Marcus Boerger wrote: >> So far it is. Yet I as much as you do not like the inconsistency. So I >> spend a little bit on providing the following patch that should do >> what >> you were loo

Re: [PHP-DEV] [RFC] Re: [PHP-DEV] __invoke() weirdness

2009-01-02 Thread Johannes Schlüter
Hi, On Wed, 2008-12-31 at 17:38 +0100, Marcus Boerger wrote: > So far it is. Yet I as much as you do not like the inconsistency. So I > spend a little bit on providing the following patch that should do > what > you were looking for. I thought bout this issue for one day or so, there are three th

Re: [PHP-DEV] [RFC] Re: [PHP-DEV] __invoke() weirdness

2009-01-02 Thread Marcus Boerger
Hello David, Friday, January 2, 2009, 8:03:22 AM, you wrote: > Marcus, > thanks! > Why is it > Test::{closure}() > {closure}() > and not > Test::{closure}() > Test::{closure}() > in that test, though? Is it because func1() "was there" from the > Engine's POV after the ctor was called? AFAIC

Re: [PHP-DEV] [RFC] Re: [PHP-DEV] __invoke() weirdness

2009-01-01 Thread David Zülke
Marcus, thanks! Why is it Test::{closure}() {closure}() and not Test::{closure}() Test::{closure}() in that test, though? Is it because func1() "was there" from the Engine's POV after the ctor was called? AFAICT, that's the only difference between the two. Cheers, - David On 01.01.20

Re: [PHP-DEV] [RFC] Re: [PHP-DEV] __invoke() weirdness

2009-01-01 Thread Marcus Boerger
Hello David, I added test closure_037.phpt to demonstrate this. marcus Thursday, January 1, 2009, 5:23:08 PM, you wrote: > Hi folks, > first of all, thank you Marcus for implementing this. Very cool. > As for the __get()/__getClosure() stuff, I don't think it's necessary > or even an issu

Re: [PHP-DEV] [RFC] Re: [PHP-DEV] __invoke() weirdness

2009-01-01 Thread David Zülke
Hi folks, first of all, thank you Marcus for implementing this. Very cool. As for the __get()/__getClosure() stuff, I don't think it's necessary or even an issue. One can never simply do $this- >getOverloadPropertyWithInvoke() anyway, because if the prop is not there, a fatal error would be

Re: [PHP-DEV] [RFC] Re: [PHP-DEV] __invoke() weirdness

2009-01-01 Thread Marcus Boerger
Hello Hannes, as discussed online. At the moment we should not have any __get() calls during method resolution. The newly updated patch does that now. And I think we are now safe to submit. In the future we could think of adding __getClosure() which would be called to resolve a dynamic closure.

Re: [PHP-DEV] [RFC] Re: [PHP-DEV] __invoke() weirdness

2009-01-01 Thread Marcus Boerger
Hello Hannes, Wednesday, December 31, 2008, 8:33:43 PM, you wrote: > On Wed, Dec 31, 2008 at 20:12, Marcus Boerger wrote: >> Hello Lars, >> >> Wednesday, December 31, 2008, 6:59:08 PM, you wrote: >> >>> Hi Markus, >> >>> have you measured the performance impact in a class with - say - ten >>> me

Re: [PHP-DEV] [RFC] Re: [PHP-DEV] __invoke() weirdness

2008-12-31 Thread Hannes Magnusson
On Wed, Dec 31, 2008 at 20:12, Marcus Boerger wrote: > Hello Lars, > > Wednesday, December 31, 2008, 6:59:08 PM, you wrote: > >> Hi Markus, > >> have you measured the performance impact in a class with - say - ten >> methods? And what to do with __get() and __call()? How are the >> prioritized in

Re: [PHP-DEV] [RFC] Re: [PHP-DEV] __invoke() weirdness

2008-12-31 Thread Marcus Boerger
Hello Lars, Wednesday, December 31, 2008, 6:59:08 PM, you wrote: > Hi Markus, > have you measured the performance impact in a class with - say - ten > methods? And what to do with __get() and __call()? How are the > prioritized in the method resolve order? Translated into user code we now have:

Re: [PHP-DEV] [RFC] Re: [PHP-DEV] __invoke() weirdness

2008-12-31 Thread Lars Strojny
Hi Markus, have you measured the performance impact in a class with - say - ten methods? And what to do with __get() and __call()? How are the prioritized in the method resolve order? cu, Lars Am Mittwoch, den 31.12.2008, 17:38 +0100 schrieb Marcus Boerger: > Hello David, > > Tuesday, December

Re: [PHP-DEV] [RFC] Re: [PHP-DEV] __invoke() weirdness

2008-12-31 Thread Sebastian Bergmann
Marcus Boerger schrieb: > Oh I hate that case insensitivity and inconsistency I am all for reducing inconsistencies (and not introducing new ones :-). -- Sebastian Bergmann http://sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867