Home >Backend Development >PHP Tutorial >function(&$var) use(&$string){ $var处理 } 的写法, use()是起什么作用?

function(&$var) use(&$string){ $var处理 } 的写法, use()是起什么作用?

WBOY
WBOYOriginal
2016-06-06 20:39:561133browse

php function(&$var) use(&$string){ $var['a'] = 'b' }
$func = 上面的
然后用 call_user_func($func);

回复内容:

php function(&$var) use(&$string){ $var['a'] = 'b' }
$func = 上面的
然后用 call_user_func($func);

http://segmentfault.com/q/1010000000355724
你问的这么随便,我只好这么随便的回答了

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn