class Person {
public static function ShowQualification() {
}
}
class School {
public static $Headmaster = new Person(); // NetBeans complains about this line
}
为什么这是不可能的?
我希望能够像这样使用它
School::Headmaster::ShowQualification();
..没有实例化任何类。我该怎么做?
更新:好的,我理解了为什么部分。有人可以解释 HOW 部分吗?谢谢 :)