Home >Backend Development >PHP Tutorial > 在函数定义时函数明前加个&是什么意思啊解决方法

在函数定义时函数明前加个&是什么意思啊解决方法

WBOY
WBOYOriginal
2016-06-13 13:22:451101browse

在函数定义时函数明前加个&是什么意思啊?
举个例子function &segment($str, $cb = ''){}。其中的&有什么用啊,代表什么?

------解决方案--------------------
function &segment($str, $cb = ''){}
& 表示函数segment可以返回引用

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