title: modify a method/function at runtime
body: <p>I've been looking at the php reflection methods, what i want to do is inject some code after the method is opened and before any return value, for example i want to change:</p>
  
  <pre><code>function foo($bar)
  {
      $foo = $bar ;
      return $foo ;
  }
  </code></pre>
  
  <p>And inject some code into it like:</p>
  
  <pre><code>function foo($bar)
  {
      //some code here
      $foo = $bar ;
      //some code here
      return $foo ;
  }
  </code></pre>
  
  <p>possible?</p>