2
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';
}
Person::whatever()
のコールは、I'm a ghost
と表示されます。 なぜですか?要約staticプロパティを上書きすることはできませんか?