We know that autoloading your classes is saving time and lines of codes, however. I must instantiate that class with $config = new config();
in order to use that loaded class.
spl_autoload_register(function($class) {
include $class . '.class.php';
});
Is it possible to load all my classes with spl_autoload_register
and then instantiate all those classes:
spl_autoload_register(function($class) {
include $class . '.class.php';
$class = new $class;
});