I noticed that most frameworks that work with MVC use require
within a method, for example the CodeIgniter3 require
file:
public function model($model, $name = '', $db_conn = FALSE)
{
...
foreach ($this->_ci_model_paths as $mod_path)
{
if ( ! file_exists($mod_path.'models/'.$path.$model.'.php'))
{
continue;
}
require_once($mod_path.'models/'.$path.$model.'.php');
$this->_ci_models[] = $name;
$CI->$name = new $model();
return $this;
}
show_error('Unable to locate the model you have specified: '.$model);
}
I think all FrameWorks PHP-based routes (and mvc) work like this, so maybe it's something that does not cause problems in the latest versions of PHP, but I'd like to know about version 5.3 if there's going to be a problem using version 5.3 is just curious).
My concern is because the ./CodeIgniter/system/core/Loader.php
usually includes a class (coming from the Model or Controller usually ) at runtime and behavior of the API (PHP).