abstract class Ghost {
protected static $var = 'I\'m a ghost';
final public static function __callStatic($method, $args = array()) {
echo self::$var;
}
}
class Person extends Ghost {
protected static $var = 'I\'m a person';
}
The call of Person::whatever() will print: I'm a ghost.
Why?
You’re looking for something called Late Static Binding, which requires PHP 5.3+