您好
"; } } $hanMM=new Student('韩梅梅','女'); echo $hanMM->hh; 解析: 核心在于,私有性的《《《属性》》》调用时才能执行__set和__get方法 extends Humanity { const BIRTHPLACE='火星'; private $hh=666; public $studentId; public function __call ($funcName,$agrs){ echo "__call方法"; } private function test($subject){ echo "{$this->name}
"; } } $hanMM=new Student('韩梅梅','女'); echo $hanMM->test(); 解析: 调用私有性的方法时才自动执行的哦