回调函数 use

1 $info["fulltext"] = preg_replace_callback(
2                 $search2,
3                 function($matches) use ($search, $uniq) {
4                     return preg_replace($search,$uniq,$matches[0]);
5                 },
6                 $info["fulltext"]
7         );
原文地址:https://www.cnblogs.com/chuanheng/p/3651812.html