Well if i do something like:
boot.php:
function boot($c) { require 'mods/'.$c.'.php'; }
spl_autoload_register('boot');
index.php
require 'boot.php';
class Father {
function __construct()
{
/* get all modules in database then loop it like: */
foreach($mods as $v) eval('$cmod = new '.$v.'()');
}
}
new Father();
Example of a class module:
class mod01 extends Father {
function __construct() { //code }
}
I would like to know if use eval is a good or bad point, i'm using it cuz i don't know the name of mods it will come of db.