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

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

WBOY
Release: 2016-06-13 10:34:28
Original
1190 people have browsed it

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

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template