函数返回引用解决方法

WBOY
Release: 2016-06-13 12:20:21
Original
789 people have browsed it

函数返回引用
function &bar()
{
    $a = 5;
    return $a;
}
$c=bar();
echo $c;
上面的函数不是运行完毕 函数体的变量不是给释放了 怎么返回的引用还有效呢?
------解决思路----------------------
运行结果不是5么?你return 返回给$c了

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!