PHP 的 use function 提示方法不能存在
controller.php
namespace App\Http\Controllers;
use function App\Http\Controllers\helper;
class WelcomeController
{
public function test() {
helper();
}
}
function.php
namespace App\Http\Controllers;
function helper()
{
return 1;
}
报错
Call to undefined function AppHttpControllershelper()
万千封印