title: Php class inheritance and rewrite?
body: <pre><code>&lt;?php
  class A {
      private function foo(){
          echo 1;
      }
      public function test(){
          $this-&gt;foo();
      }
  }
  class B extends A{
      public function  foo(){
          echo 0;
      }
  }
  $b = new B();
  echo $b-&gt;test();
  </code></pre>
  
  <p>Class B inherits from class A. Why does the output result in 1 instead of 0?</p>