spl_autoload_register

Supported Versions: PHP 5 >= 5.1.0, PHP 7, PHP 8
Register given function as __autoload() implementation
<?php spl_autoload_register(?callable $callback = null, bool $throw = true, bool $prepend = false): bool
<?php     protected function prependToLoaderStack()

    {

        spl_autoload_register([$this, 'load'], true, true);

    }
<?php     spl_autoload_register(function ($class) {


        if (stripos($class, 'PHPCompatibility') !== 0) {

            return;

        }



        $file = realpath(__DIR__) . DIRECTORY_SEPARATOR . strtr($class, '\\', DIRECTORY_SEPARATOR) . '.php';



        if (file_exists($file)) {

            include_once $file;

        }

    });

}
<?php     public function register($prepend = false)

    {

        spl_autoload_register(array($this, 'loadClass'), true, $prepend);



        if (null === $this->vendorDir) {

            return;
<?php             return self::$loader;

        }



        spl_autoload_register(array('ComposerAutoloaderInitFilesAutoloadOrder', 'loadClassLoader'), true, true);

        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));

        spl_autoload_unregister(array('ComposerAutoloaderInitFilesAutoloadOrder', 'loadClassLoader'));
<?php             return self::$loader;

        }



        spl_autoload_register(array('ComposerAutoloaderInitFilesAutoload', 'loadClassLoader'), true, true);

        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));

        spl_autoload_unregister(array('ComposerAutoloaderInitFilesAutoload', 'loadClassLoader'));
<?php             return self::$loader;

        }



        spl_autoload_register(array('ComposerAutoloaderInitFilesAutoload', 'loadClassLoader'), true, true);

        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));

        spl_autoload_unregister(array('ComposerAutoloaderInitFilesAutoload', 'loadClassLoader'));
<?php             return self::$loader;

        }



        spl_autoload_register(array('ComposerAutoloaderInitFilesAutoload', 'loadClassLoader'), true, true);

        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));

        spl_autoload_unregister(array('ComposerAutoloaderInitFilesAutoload', 'loadClassLoader'));
<?php             return self::$loader;

        }



        spl_autoload_register(array('ComposerAutoloaderInitIncludePath', 'loadClassLoader'), true, true);

        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));

        spl_autoload_unregister(array('ComposerAutoloaderInitIncludePath', 'loadClassLoader'));
<?php         \Composer\Autoload\ComposerStaticInitIncludePath::getInitializer($loader)();



        $loader->setUseIncludePath(true);

        spl_autoload_register(array('ComposerAutoloaderInitIncludePath', 'autoload'), true, true);



        $loader->register(true);
<?php             return self::$loader;

        }



        spl_autoload_register(array('ComposerAutoloaderInitTargetDir', 'loadClassLoader'), true, true);

        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));

        spl_autoload_unregister(array('ComposerAutoloaderInitTargetDir', 'loadClassLoader'));
<?php         require __DIR__ . '/autoload_static.php';

        \Composer\Autoload\ComposerStaticInitTargetDir::getInitializer($loader)();



        spl_autoload_register(array('ComposerAutoloaderInitTargetDir', 'autoload'), true, true);



        $loader->register(true);
<?php         require __DIR__ . '/platform_check.php';



        spl_autoload_register(array('ComposerAutoloaderInit46489d6835a727203ffccd612295440e', 'loadClassLoader'), true, true);

        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));

        spl_autoload_unregister(array('ComposerAutoloaderInit46489d6835a727203ffccd612295440e', 'loadClassLoader'));
<?php     public function register($prepend = false)

    {

        spl_autoload_register(array($this, 'loadClass'), true, $prepend);



        if (null === $this->vendorDir) {

            return;
<?php             return self::$loader;

        }



        spl_autoload_register(array('ComposerAutoloaderInit894a6ddbda1e609774926efb0f5a8fc2', 'loadClassLoader'), true, true);

        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));

        spl_autoload_unregister(array('ComposerAutoloaderInit894a6ddbda1e609774926efb0f5a8fc2', 'loadClassLoader'));
<?php     public function register($prepend = false)

    {

        spl_autoload_register(array($this, 'loadClass'), true, $prepend);



        if (null === $this->vendorDir) {

            return;