Re: Overriding static members?

From: Date: Sun, 28 Nov 2004 21:04:46 +0000
Subject: Re: Overriding static members?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-203028@lists.php.net to get a copy of this message
Matthew Weier O'Phinney wrote:
* Francisco M. Marzoa Alonso <fmmarzoa@gmx.net>:
Can I override static members in someway under PHP5? Is the answer is negative, Why not?
If they are marked public (or not marked at all as public, private, or protected, in which case the default is public), then yes, you can override them.
Override is misleading. Since they can only be access by Classname::$var, unless you use Reflection, code designed to work with the parent class can't access the child class's static variables. Greg

« previous php.general (#203028) next »