title: Parent class always undefined
body: <p>I have a weird problem in PHP. I have two classes, one extending another. The problem is that i when I try to access a variable in the parent class (via a <code>getVar()</code> method), it returns <code>undefined</code>, even though it had been already defined in the parent's constructor.</p>
  
  <pre class="lang-php prettyprint-override"><code>class HttpClient
  {
      private $errorList;
  
      public function __construct()
      {
          $errorList = [];
      }
  
      public function getHttpErrorList() { return $errorList; }
  
      //...
  }
  </code></pre>
  
  <pre class="lang-php prettyprint-override"><code>class Twitter extends HttpClient 
  {
      public function __construct()
      {
          parent::__construct();
  
          //..
      }
  
      public function getMessages()
      {   
          //...
  
          var_dump($this-&gt;getHttpErrorList()); //returns undefined variable!
      }
  </code></pre>
  
  <p>What is the cause of this problem and how do I solve it?</p>