在命名空間下 new類 如在 Home\Controller命名空間中 new testClass(); 在spl_autoload_register($class) 中,$class 等於Home\Controller\testClassblog
而在命名空間下 new類 如在 Home\Controller命名空間中 $class='testClass' ; new $class(); 在spl_autoload_register($class) 中,$class 等於testClassclass
而在命名空間下 new類 如在 Home\Controller命名空間中 new \testClass(); 在spl_autoload_register($class) 中,$class 等於testClasstest