标签:
//在自定义函数中,前面加一个&符号,是对返回静态变量的引用 function &test(){ static $a; $a += 1; echo $a; return $a; } //看展示 $t = test(); //$t结果为:1 $t = 5; $t = test(); //$t结果为:2 $t = &test(); //$t结果为:3 $t = 5; $t = test(); //$t结果为:6
标签:
原文地址:http://www.cnblogs.com/shiwenhu/p/4826608.html