What is more efficient?
I'm on my phone sorry for php or word errors
Requiring every class directly
Or through an autoload function?
I'm on my phone sorry for php or word errors
Requiring every class directly
PHP:
<?php
Require('example.class.php');
$foo = new example;
?>
PHP:
<?php
SPL_autoload_register( function($class) {
Require("$class.class.php");
});
$foo = new example;
?>