spl_autoload

(PHP 5 >= 5.1.0, PHP 7, PHP 8)

spl_autoloadDefault implementation for __autoload()

Açıklama

spl_autoload(string$class, ?string$file_extensions = null): void

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 spl_autoload() will be used for any later call to __autoload().

Bağımsız Değişkenler

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.

Dönen Değerler

Hiçbir değer dönmez.

Hatalar/İstisnalar

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

Sürüm Bilgisi

Sürüm: Açıklama
8.0.0file_extensions is now nullable.
To Top