为什么我在父类里定义一下private属性,通过子类继承,可在外面访问,
class Human{
private $height;
}
class Player extends Human {
protected $age;
function __construct($name,$height){
$this->name = $name;
$this->height = $height;
}
}
$joden=new Player('joden','25');
echo $joden->height;