The following code is creating an infinite loop:
$app->OBJ = (object) array(
// SYSTEM OBJECTS
'SCOPE' => TRUE,
'URI' => TRUE,
'Log' => FALSE,
// APPLICATION OBJECTS
'User' => TRUE,
'Email' => TRUE,
'Files' => TRUE,
);
foreach ($app->OBJ as $obj => $bool) {
if($bool){
if(!class_exists($obj)) exit('Internal Error: Class \''.$obj.'\' not found.');
${strtoupper($obj)} = new $obj();
}
}
But if I comment this line the loop stops:
// ${strtoupper($obj)} = new $obj();
All my class files are loaded, why is class_exists
creating an infinite loop?