title: How to add methods dynamically
body: <p>I'm trying to add methods dynamically from external files.
  Right now I have <code>__call</code> method in my class so when i call the method I want, <code>__call</code> includes it for me; the problem is I want to call loaded function by using my class, and I don't want loaded function outside of the class;</p>
  
  <pre><code>Class myClass
  {
      function__call($name, $args)
      {
          require_once($name.".php");
      }
  }
  </code></pre>
  
  <p>echoA.php:</p>
  
  <pre><code>function echoA()
  {
      echo("A");
  }
  </code></pre>
  
  <p>then i want to use it like:</p>
  
  <pre><code>$myClass = new myClass();
  $myClass-&gt;echoA();
  </code></pre>
  
  <p>Any advice will be appreciated.</p>