抽象静态属性不能被覆盖?

Sho*_*hoe 2 php oop abstract-class

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';
}
Run Code Online (Sandbox Code Playgroud)

的调用Person::whatever()将打印:I'm a ghost。为什么?

Ben*_*Ben 5

您正在寻找名为Late Static Binding 的东西,它需要 PHP 5.3+