namespace test;
class core
{
static public function start()
{
spl_autoload_register('test\\core::autoload');
$a = 'thisclass';
new thisclass();
// new $a();
}
static public function autoload($class)
{
echo $class.'</br>';
}
}
new thisclass();结果 test\thisclass
new $a 结果 thisclass