title: Lazy Classes Includes PHP
body: <p>I use a autoloader to include classes. What i'm doing right now is using "glob" to read different dir's and push them in an array. Is there a better solution to this? </p>
  
  <pre><code>$path = './';
  
  $files = array_merge(
  glob($path.'includes/classes/system/*.class.php'),
  glob($path.'includes/classes/system/baseclasses/*.class.php'),
  glob($path.'includes/classes/system/systementities/*.class.php'));
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>I use this inside an autoload class. The problem is that I have to search for the files with glob. Is there a faster way to do this?</p>