Autoloading with Namespaces
Autoloading automatically loads class files when they are needed.
This avoids manually including files.
Example
Section titled “Example”spl_autoload_register(function ($class) {
$path = str_replace("\\", "/", $class) . ".php";
require $path;
});