Re: [PHP-DEV] Protected static props redeclared as public share value across classes

2008-03-03 Thread Robin Fernandes
On 26/02/2008, Robin Fernandes <[EMAIL PROTECTED]> wrote: > > On 28/01/2008, Marcus Boerger <[EMAIL PROTECTED]> wrote: > > > > > > I checked it out in more detail and it is indeed broken as in it is > not > > > consistent > > If possible, I'd like to revive this discussion. Patch included

Re: [PHP-DEV] Protected static props redeclared as public share value across classes

2008-02-26 Thread Robin Fernandes
Hi Marcus, On 28/01/2008, Marcus Boerger <[EMAIL PROTECTED]> wrote: > > > > I checked it out in more detail and it is indeed broken as in it is not > > consistent If possible, I'd like to revive this discussion. Patch included. :) History: http://thread.gmane.org/gmane.comp.php.devel/47956/f

Re: [PHP-DEV] Protected static props redeclared as public share value across classes

2008-01-28 Thread Robin Fernandes
Marcus, Thanks for looking in more detail. > I checked it out in more detail and it is indeed broken as in it is not > consistent: > [EMAIL PROTECTED] PHP_5_3]$ php -r 'class A { protected static $p=1; } class > B extends A { protected static $p=2; } ReflectionClass::Export("B");' > -> works =

Re: [PHP-DEV] Protected static props redeclared as public share value across classes

2008-01-28 Thread Jochem Maas
Marcus Boerger schreef: Hello Robin, I checked it out in more detail and it is indeed broken as in it is not consistent: [EMAIL PROTECTED] PHP_5_3]$ php -r 'class A { protected static $p=1; } class B extends A { protected static $p=2; } ReflectionClass::Export("B");' -> works == 2 properties

Re: [PHP-DEV] Protected static props redeclared as public share value across classes

2008-01-28 Thread Marcus Boerger
Hello Robin, I checked it out in more detail and it is indeed broken as in it is not consistent: [EMAIL PROTECTED] PHP_5_3]$ php -r 'class A { protected static $p=1; } class B extends A { protected static $p=2; } ReflectionClass::Export("B");' -> works == 2 properties -> but should fail because

Re: [PHP-DEV] Protected static props redeclared as public share value across classes

2008-01-28 Thread Lokrain
Hi All, A property can share it's value with it's parent but methods need to call parent::$method() and this is not done by default that is why the behavior is different. Is that the right behavior?! I really don't know. I think the inheritance of the static methods as two distinct methods is righ

Re: [PHP-DEV] Protected static props redeclared as public share value across classes

2008-01-28 Thread Robin Fernandes
Hi Marcus, Thanks for the prompt reply and explanation. I have some further questions though: > If the base class had the property defined as private > then the property is private to that specific class and not directly > accessible by derived classes that is it's name gets prefixed with the cla

Re: [PHP-DEV] Protected static props redeclared as public share value across classes

2008-01-28 Thread Marcus Boerger
Hello Robin, expected behavior. The static property is inherited to the sub class. As that subclass repeats the declaration with a different visibility you simply change the visibility. If the base class had the property defined as private then the property is private to that specific class and