title: Inherited Class Properties Returning NULL
body: <p>I have two classes: <strong>News</strong> and <strong>NewsComments</strong>. When I instantiate the <strong>News</strong> class, I pass the ID of the news post like this:</p>
  
  <pre><code>$News = new News($_POST['news_id']);
  </code></pre>
  
  <p>Then I instantiate the <strong>NewsComments</strong> class underneath it with this code:</p>
  
  <pre><code>$NewsComments = new NewsComments($_POST['comment_id']);
  </code></pre>
  
  <p>Here is the <strong>News</strong> class code.</p>
  
  <pre><code>class News extends Privilege
  {
      public function __construct($id = null) {
          if(!is_null($id))
              $this-&gt;news_id = $id;
      }
  }
  </code></pre>
  
  <p>Then there's the child class, NewsComments.</p>
  
  <pre><code>class NewsComments extends News
  {
      public function testFunction() {
          return $this-&gt;news_id; // This will return null
      }
  }
  </code></pre>
  
  <p>For some reason, I cannot access the $this->news_id variable in the <strong>NewsComments</strong> child class, even though it <em>extends</em> the <strong>News</strong> class. I did a <em>var_dump</em> on <em>$this->news_id</em> in one of my files that deletes a news comment, but it returns <em>NULL</em>. I checked to make sure <em>$_POST['id']</em> is not NULL by replacing it with the number 7 (which is the ID of an existing news post), yet I get the same error:</p>
  
  <pre><code>Notice: Undefined property: NewsComments::$news_id
  </code></pre>
  
  <p>Both the <strong>news.php</strong> and <strong>newscomments.php</strong> files are included in the script, and no errors are present indicating they failed to be included. I've tried many things, such as adding <strong>parent::__construct()</strong> in the constructor method of my child class, <strong>NewsComments</strong>. Any help is greatly appreciated.</p>