What is autoload in PHP?

Autoloading is the process of automatically loading PHP classes without explicitly loading them with the require() , require_once() , include() , or include_once() functions. It's necessary to name your class files exactly the same as your classes.

As of PHP 7.2.0 the __autoload() function has been deprecated. Now it is recommended to use the spl_autoload_register() for that purpose instead.

Comments

Popular posts from this blog

Basic Terminology

What is normalization in DBMS?

Object oriented programming concepts in PHP