spl_autoload

Default implementation for __autoload()

&reftitle.description; `void` `spl_autoload` `string` `class` ``string``null```file_extensions`&null;

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`.

&reftitle.parameters;

`class`

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

`file_extensions`

- 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.

&reftitle.returnvalues;

&return.void;

&reftitle.errors;

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

&reftitle.changelog;

&Version; | &Description;
8.0.0 | `file_extensions` is now nullable.