title: PHP - extend method like extending a class
body: <p>I have 2 class:</p>
  
  <pre><code>class animal{
      public function walk(){
          walk;
      }
  }
  
  class human extends animal{
      public function walk(){
          with2legs;
      }
  }
  </code></pre>
  
  <p>This way, if i call human->walk(), it only runs with2legs;</p>
  
  <p>But I want the run the parent's walk; too.</p>
  
  <p>I know I can modify it this way:</p>
  
  <pre><code>class human extends animal{
      public function walk(){
          parent::walk();
          with2legs;
      }
  }
  </code></pre>
  
  <p>But the problem is, I have many subclasses and I don't want to put parent::walk(); into every child walk(). Is there a way I can extend a method like I extend a class? Without overriding but really extending the method. Or is there better alternatives?</p>
  
  <p>Thanks.</p>