title: child class accessing parent's private method?
body: <p>A user posted a comment on PHP <a href="http://php.net/manual/en/language.oop5.visibility.php" rel="nofollow noreferrer">Visibility manual page</a>. It's the second most voted comment. He used this code example:</p>
  
  <pre><code>&lt;?php
  abstract class base {
      public function inherited() {
          $this-&gt;overridden();
      }
      private function overridden() {
          echo 'base';
      }
  }
  
  class child extends base {
      private function overridden() {
          echo 'child';
      }
  }
  
  $test = new child();
  $test-&gt;inherited();
  ?&gt;
  </code></pre>
  
  <p>Output will be "base". </p>
  
  <p>As I understand it: the "child" class inherits the <strong>inherited()</strong> method. Does not inherit the <strong>overridden()</strong> method since it is private but defines its own one instead. But when the <strong>test</strong> object (instance of child class) runs the inherited() method it outputs "base".</p>
  
  <p>So my questions are: </p>
  
  <ol>
  <li>How come the child runs a method to which it does not have access?</li>
  <li>Why it does not run its own redefined method?</li>
  </ol>