title: PHP spl_autoload_register
body: <p>I am trying to take advantage of autoloading in PHP. I have various classes in different directories, and so I have bootstrapped the autoloading as follows:</p>
  
  <pre><code>function autoload_services($class_name)
  {
      $file = 'services/' . $class_name. '.php';
      if (file_exists($file))
      {
          require_once($file);
      }
  }
  
  function autoload_vos($class_name)
  {
      $file = 'vos/' . $class_name. '.php';
      if (file_exists($file))
      {
          require_once($file);
      }
  }
  
  function autoload_printers($class_name)
  {
      $file = 'printers' . $class_name. '.php';
      if (file_exists($file))
      {
          require_once($file);
      }
  }
  
  spl_autoload_register('autoload_services');
  spl_autoload_register('autoload_vos');
  spl_autoload_register('autoload_printers');
  </code></pre>
  
  <p>It all seems to work fine, but I just wanted to double check that this is indeed considered acceptable practise.</p>