title: PHP call overridden child class function from parent class function in a child object
body: <p>I have following class structure</p>
  
  <pre><code>class A 
  {
    function aa(){
     //do something in aa
     $this-&gt;ab();
    }
  
    function ab(){
     //do something in ab
    }
  }
  
  Class B extends A
    function ab(){
     //do something else in ab
    }
  }
  
  $b = new B();
  $b-&gt;aa();
  </code></pre>
  
  <p>When I call aa() from the object of class B, how can I override the method ab, to make sure its called from class B?</p>