输入banner图图片脚本导航/分类

为什么函数使用use会报错?

phpstorm报错:

代码:

$container = [];
function app($class_name) use ($container)
{
    return $container -> get($class_name);
}

报错:

Parse error: syntax error, unexpected 'use' (T_USE), expecting '{' in C:\Users\shellus\www\php-redis-note\public\index.php on line 16