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

关于摘引变量的疑惑

WBOY
WBOYOriginal
2016-06-13 12:42:07873browse

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

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

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