您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
三六零分类信息网 > 潍坊分类信息网,免费分类信息发布

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

2025/9/13 4:47:33发布20次查看
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
潍坊分类信息网,免费分类信息发布

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product