array_map(function($v)use($status){
return $this->_formatProject($v,$status);
},$projects)
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
如你所见
这里有闭包。PHP向闭包传递参数的方法目前推荐user,老版本中可以使用global
闭包要使用外部变量的时候,要用
use.