可以这样用:
use vendor\Path\Class;
// 然后方法里用:
(new Class())->method()
也可以这样用:
// 不用 use, 直接在方法里写:
(new vendor\Path\Class())->method()
其中:
// new 可以这样,带括号
(new vendor\Path\Class())->method()
// 也可以这样,不带括号:
(new vendor\Path\Class)->method()
操。。。我蹦溃了,到底要咋样???