title: get list of used user functions in php?
body: <p>When using <code>get_defined_functions()</code> and <code>get_declared_classes()</code> I do get a list of all functions and classes that is included, or loaded, into my site.<br>
  But in my case, I have sort of a framework-folder that contains a lot of files, including functions and classes, that are made available for all my projects. It also reduce the need of duplicates.  </p>
  
  <p>I load functions like this:</p>
  
  <pre><code>foreach(glob('dir/local/*.func.php') as $function_file){include $function_file;}  //  allways load functions from this projects folder
  if(defined('use_framework')){  //  if framework is activated, load functions from framework aswell.
      foreach(glob('dir/framework/*.func.php') as $function_file){
          $function_name=explode('.',pathinfo($function_file,PATHINFO_FILENAME));
          if(!function_exists($function_name[0])){include $function_file;}
      }
  }
  </code></pre>
  
  <p>Classes is ok since I use <code>spl_autoload_register()</code> to load them...</p>
  
  <p>But is there a way to detect what functions is actually been used?<br>
  As of now I just keep a list up to date, but thought there might be a more automated way.</p>