title: How to autoload extended classes?
body: <p>I am planning to use PHP's autoload function to dynamicly load only class files that are needed.  Now this could create a huge mess if every single function has a seperate file, So I am hoping and asking is there a way to have related classes remain in 1 class file and still be auto-loaded</p>
  
  <pre><code>function __autoload($class_name){
      include('classes/' . $class_name . '.class.php');
  }
  </code></pre>
  
  <p>Let's say there is a class name animals and then another class named dogs.  Dogs class extends animals class, now if I were to call the dogs class but NOT call the animals class, would the animals class file still be loaded?</p>