Home >Backend Development >PHP Tutorial >function b($name, &$value) 里面 $value 前面的& 是干啥的啊?

function b($name, &$value) 里面 $value 前面的& 是干啥的啊?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 14:19:501155browse

function b($name, &$value)  里面 $value 前面的& 是干啥的啊?


回复讨论(解决方案)

http://www.baidu.com/s?wd=php%D2%FD%D3%C3
PHP 引用

引用传递

function b($name, &$value) {  $value = $name . $value;}$x = 'abc';$y = 123;b($x, $y);echo $y;//abc123

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
Previous article:php类和对象的问题Next article:nginx伪静态求助 感谢