我在php文档中找到了我需要的部分,但是遇到了问题 PHP documentation
检查例3
我的代码
namespace Test;
class Test{
public function __construct() {
echo 1;
}
}
use Test\Test as Test;
$a = 'Test';
new $a;
致命错误:未捕获错误:
中未找到类'测试'
PS。当我用new Test
创建时,一切正常
版本PHP 7.0.4