title: SPL Autoload and namespaces
body: <p>After looking through the web I have managed to build a working SPL_Autoload and use namespaces in it. It does work but it also looks a bit strange to me compared to all of the examples I was looking at and the documentation. Am I using everything and understanding it correctly?</p>
  
  <p>$class looks up a class called subdir\timer and since it cannot find it goes to the SPL_autoload</p>
  
  <pre><code>$class = new subdir\timer;
  </code></pre>
  
  <p>The SPL_autoload is suppose to look for a file in the folder 'subdir' with a file 'timer' ending in either .php or .class.php (thanks to the SPL_extensions)</p>
  
  <p>Now I am not really sure what is going on in register and SPL_autoload. When I tried register by itself it was not using the _extensions but when i added spl_autoload it worked fine. Only thing is I have never seen it setup like this in any examples so I really question this part</p>
  
  <pre><code>spl_autoload_extensions(".php,.class.php");
  spl_autoload_register(function($class){
      spl_autoload("$class");
  });
  </code></pre>
  
  <p>What do you think, any things that cam be improved on or that I did wrong?</p>