php class extend - run something before running parent function
<p>say I have this class:</p>

<pre><code>class animal {
   function noise() {
       print 'woof';
   }
   function move() {
       print 'moved';
   }
}

class dog extends animal {

}
</code></pre>

<p>What I would like to do is when i run $dog->noise() or $dog->move(), it would run something first prior to calling animal class's noise/move. Is this doable? Like maybe logging the function call. If not with class extend, what else can I use to achieve this?</p>

<p>Thank you!</p>
