Is it possible to dynamically add code to/extend a class?
<p>I want to write a sort of "plugin/module" system for my code, and it would make it much easier if I could "add" stuff into a class after it's been defined.</p>

<p>For example, something like this:</p>

<pre><code>class foo {
  public function a() {
     return 'b';
  }
}
</code></pre>

<p>There's the class. Now I want to add another function/variable/const to it, after it's defined.</p>

<p>I realize that this is probably not possible, but I need confirmation.</p>
