title: inheriting properties in php
body: <p>I have a superclass which contains properties &amp; methods for setting them</p>
  
  <pre><code>class Super{
      private $property;
  
      function __construct($set){
          $this-&gt;property = $set;
      }
  }
  </code></pre>
  
  <p>then I have a subclass that needs to use that property</p>
  
  <pre><code>class Sub extends Super{
      private $sub_property
  
      function __construct(){
          parent::__construct();
          $this-&gt;sub_property = $this-&gt;property;
      }
  }
  </code></pre>
  
  <p>but I keep getting an error</p>
  
  <pre><code>Notice: Undefined property: Sub::$property in sub.php on line 7
  </code></pre>
  
  <p>where am I going wrong?</p>