Maison >développement back-end >tutoriel php >为什么函数使用use会报错?
phpstorm报错:
代码:
<code>$container = []; function app($class_name) use ($container) { return $container -> get($class_name); } </code>
报错:
<code>Parse error: syntax error, unexpected 'use' (T_USE), expecting '{' in C:\Users\shellus\www\php-redis-note\public\index.php on line 16</code>