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

SQL Interview Questions

When we can use abstract class & interface? Why we are using abstract class & interface?

What is difference between http and https?