关于摘引变量的疑惑

WBOY
Release: 2016-06-13 12:42:07
Original
873 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!