title: PHP - How to extend and access parent constructor properties
body: <p>I am attempting to access the parent class __construct properties within a child class that extends this, however not sure how to do this as I have tried multiple methods and didn't give me the expected result.</p>
  
  <p>So I have a baseController and a indexController which extends it, I want to be able to have direct access to the properties of the parent within the child controller.</p>
  
  <pre><code>            $config = ['site' =&gt; 'test.com'];
  
              class baseController {
  
                  public function __construct($config){
  
                      $this-&gt;config = $config;
  
                  }
  
              }
  
              class indexController extends baseController {
  
                  public function __construct(){
                      parent::__construct(); // doesnt seem to give any outcome
                  }
  
                  public static function index() {
  
                      var_dump($this-&gt;config); // need to access within this method
  
                  }
  
              }
  
              $app-&gt;route('/',array('indexController','index')); // the route / would call this controller and method to return a response
  </code></pre>