PHP Private variable access from child
so I'm trying to work out an issue I'm having in designing PHP classes. I've created a base class, and assigned private variables. I have child classes extending this base class, which make reference and changes to these private variables through functions of the base class. Here's an example, keep in mind I'm still confused about the difference between private and protected methods/variables (let me know if I'm doing it wrong!): base.class.php <?php class Base { private $test; public function __construct(){ require('sub.class.php'); $sub = new Sub; echo($this->getTest()); } public function