<?phpnamespaceapp\index\controller;classAbc{publicfunction__construct(){}// index/abc/testpublicstaticfunctiontest(){//File:H:\\...\\application\\index\\controller\\Abc.php Line(11) Non-static method app\\index\\controller\\Abc::getUserInfo() should not be called statically//self::getUserInfo();//没问题$userInfo=(newself())->getUserInfo();//没问题$userInfo1=(newAbc())->getUserInfo();}publicfunctiongetUserInfo(){return['id'=>1,'name'=>'姓名','is_vip'=>1,];}}