Why is PHP private variables working on extended class?
问题 Shouldn't it generate error when i try to set the value of a property from the extended class instead of a base class? <?php class first{ public $id = 22; private $name; protected $email; public function __construct(){ echo "Base function constructor<br />"; } public function printit(){ echo "Hello World<br />"; } public function __destruct(){ echo "Base function destructor!<br />"; } } class second extends first{ public function __construct($myName, $myEmail){ $this->name = $myName; $this-