Re: [PHP-DEV] is_a() - again - a better fix

2011-09-20 Thread Alan Knowles
Ferenc, yes I know you are generally -1 on reverting this. Currently this bug has 20 votes all at 'this seriously affects me' I know Pierre and I are +1 for reverting this change I think Zeev and Stas where -1 for reverting I've already seen bugs on random packages (outside PEAR) reporting pro

Re: [PHP-DEV] is_a() - again - a better fix

2011-09-20 Thread Ferenc Kovacs
On Tue, Sep 20, 2011 at 11:54 PM, Alan Knowles wrote: > Let's try and close this one. > > https://bugs.php.net/bug.php?id=55475 > > I've just added a patch that adds is_class_of(), which is identical to > is_subclass_of, and has the new feature of supporting strings and using the > autoloader. > >

[PHP-DEV] is_a() - again - a better fix

2011-09-20 Thread Alan Knowles
Let's try and close this one. https://bugs.php.net/bug.php?id=55475 I've just added a patch that adds is_class_of(), which is identical to is_subclass_of, and has the new feature of supporting strings and using the autoloader. It then reverts is_a() back to the previous behavior, and clarifi

Re: [PHP-DEV] __constructor parameter limitations.

2011-09-20 Thread Stas Malyshev
Hi! On 9/20/11 12:07 PM, Reindl Harald wrote: but it is not logical foo() in B can do anything with $a before or after parent::foo() and the caller does not need to know at any point that B has anything to do with the class A Consider this code: function doFoo(A $a) { $a->foo(); } It's fi

Re: [PHP-DEV] __constructor parameter limitations.

2011-09-20 Thread Reindl Harald
but it is not logical foo() in B can do anything with $a before or after parent::foo() and the caller does not need to know at any point that B has anything to do with the class A Am 20.09.2011 19:40, schrieb Stas Malyshev:Hi! On 9/19/11 2:32 AM, Gustavo Lopes wrote: > The thing if you introduce

Re: [PHP-DEV] __constructor parameter limitations.

2011-09-20 Thread Stas Malyshev
Hi! On 9/19/11 8:34 AM, Etienne Kneuss wrote: Sure, you can do it. But if you do, you're lying about the interface. You're telling the callers that you expect no arguments, but then all of a sudden you error out. Well, we have no way of declaring that we accept an undefined number of argu

Re: [PHP-DEV] __constructor parameter limitations.

2011-09-20 Thread Stas Malyshev
Hi! On 9/19/11 7:26 AM, Anthony Ferrara wrote: that point, why even bother with interfaces? The interface defines what should be accepted, and any method that implements it should accept exactly that (no more, no less, no different). Otherwise Here you lost me. Why exactly you can not accept

Re: [PHP-DEV] __constructor parameter limitations.

2011-09-20 Thread Stas Malyshev
Hi! On 9/19/11 3:20 AM, Pierre Joye wrote: If we talk about implementing the abstract concept and we use the interface model to do it, then we do it wrong. I'm out of other arguments, or maybe one new one, if we implement abstract like interface, then let kill abstract support, we don't need tha

Re: [PHP-DEV] __constructor parameter limitations.

2011-09-20 Thread Stas Malyshev
Hi! On 9/19/11 2:50 AM, Gustavo Lopes wrote: * It had to be case that the parameters you want to ignore are the last Of course, but that's a very common scenario - important parameters go first, unimportant go last. Or, if I wanted, I could just have blank signature foo() and figure it out i

Re: [PHP-DEV] __constructor parameter limitations.

2011-09-20 Thread Stas Malyshev
Hi! On 9/19/11 2:32 AM, Gustavo Lopes wrote: The thing if you introduce func_get_args() to the argument, any discussion about enforcing signatures becomes meaningless. One could argue this should be allowed: class A { function foo() {} } class B extends A { function foo($a) {} } No, this can

Re: [PHP-DEV] CLI-Webserver display_errors going where?

2011-09-20 Thread Laruence
Hi: np, :) thanks 2011/9/20 Scott Aubrey : > Hi Laurence > > This seems to work with the latest snapshot (201109201230) but not in beta1 > that I *was* testing with. > > Sorry for bothering you, > > Thanks > > - Scott > > Scott Aubrey > Systems Developer > Christians Against Poverty UK - [capu

Re: [PHP-DEV] CLI-Webserver display_errors going where?

2011-09-20 Thread Scott Aubrey
Hi Laurence This seems to work with the latest snapshot (201109201230) but not in beta1 that I *was* testing with. Sorry for bothering you, Thanks - Scott Scott Aubrey Systems Developer Christians Against Poverty UK - [capuk.org] On 20 Sep 2011, at 15:42, Laruence wrote: > Hi : > I can

Re: [PHP-DEV] CLI-Webserver display_errors going where?

2011-09-20 Thread Laruence
Hi : I can not reproduce this. could you try with 5.4beta or svn-trunk? thanks 2011/9/20 Scott Aubrey : > Hi list. > > display_errors seems to have no effect when using the new CLI-Webserver. Is > this expected? > > I've tried setting display_errors to 1, On and stderr, and doing standard

[PHP-DEV] CLI-Webserver display_errors going where?

2011-09-20 Thread Scott Aubrey
Hi list. display_errors seems to have no effect when using the new CLI-Webserver. Is this expected? I've tried setting display_errors to 1, On and stderr, and doing standard fopen/fwrite/fclose to php://stdout or php://stderr works as expected. Before I report a bug, I want to be sure it's no