spl_autoload - 从我当前的加载器更改为它

I did a autoload structured file from pick lot of classes from directory, but see some examples on WEB, the function spl_autoload_register() can change my application performance.

So, my current process search for files in current folder and load it all on start the application.

$folder = dirname(__FILE__);
foreach($files as $file)
{
    $path = $folder . DIRECTORY_SEPARATOR . $file;
    if (strtolower(substr($path, -4)) == '.php')
    {
        require_once $path;
    }
}

My doubt is how I change this code structure to call spl_autoload_register() inside the loop of files that I can load on demand ?