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