我说Common.php
的是 CodeIgniter 框架的文件(系统/核心文件夹)。
// 虽然不需要回答这个问题!
我一直在浏览代码,在函数开始时无法理解这些特定的行。load_class
static $_classes = array();
// Does the class exist? If so, we're done...
if (isset($_classes[$class]))
{
return $_classes[$class];
我的疑问是,将变量声明为空数组并立即检查该数组中是否存在某个键是不是毫无意义?还是我错过了与static
关键字相关的内容?