PHP中引述(变量和函数名前加&符号)的用法

WBOY
Release: 2016-06-13 10:40:29
Original
892 people have browsed it

PHP中引用(变量和函数名前加&符号)的用法
http://www.ityizhan.com/php-reference-usage/

<?php $a = 5;$b = $a;echo $b;$a++;echo '<br>';echo $b;?>&相当于动态跟踪变量 而不是固定他的值
Copy after login


$a = 5;$b = &$a;$b="world";echo $a;     //world
Copy after login
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