title: PHP Class Inheritance and extending methods
body: <p>I want to accomplish the following, but I'm not sure how to do it:</p>
  
  <pre><code>class foo {
      function doSomething(){
          // do something
      }
  }
  
  class bar extends foo {
      function doSomething(){
          // do something AND DO SOMETHING ELSE, but just for class bar objects
      }
  }
  </code></pre>
  
  <p>Is it possible to do this while still using the <code>doSomething()</code> method, or do I have to create a new method?</p>
  
  <p>Edit: To clarify, I do not want to have to restate 'do something' in the inherited method, I just want to state it once in the foo->doSomething() method and then build upon it in child classes.</p>