GoLang spl_autoload

request it (336)
GoLang replacement for PHP's spl_autoload [edit | history]

Do you know a GoLang replacement for PHP's spl_autoload? Write it!

PHP spl_autoload

PHP original manual for spl_autoload [ show | php.net ]


(PHP 5 >= 5.1.0, PHP 7)

spl_autoloadDefault implementation for __autoload()


void spl_autoload ( string $class_name [, string $file_extensions = spl_autoload_extensions() ] )

This function is intended to be used as a default implementation for __autoload(). If nothing else is specified and spl_autoload_register() is called without any parameters then this function will be used for any later call to __autoload().



The lowercased name of the class (and namespace) being instantiated.


By default it checks all include paths to contain filenames built up by the lowercase class name appended by the filename extensions .inc and .php.

Return Values

No value is returned.


Throws LogicException when the class is not found and there are no other autoloaders registered.