Home > Backend Development > PHP Tutorial > 关于摘引变量的疑惑

关于摘引变量的疑惑

WBOY
Release: 2016-06-13 11:29:04
Original
821 people have browsed it

关于引用变量的疑惑
$foo='Bob';
$bar=&$foo;
$bar="my name is $bar";
echo $bar.'
';
echo $foo;

这是手册上的一个例子,我有疑惑的就是输出$bar的结果我能理解,但是为何输出$foo的时候,他的值不是Bob,而是my name is Bob,为何其值会变,请高手解释,谢谢!

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