Blogger Information
Blog 16
fans 0
comment 1
visits 13045
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
变量 可变变量 全局变量
IT浪子走天涯
Original
1007 people have browsed it

给变量赋值的两种办法

1、值传递  $var1 = $var2;    两个变量使用不同的空间

2、引用赋值 $var1 = &$var3;  注意前边的引用符号  两个变量使用相同的空间

可变变量:变量名来自于另一个变量的值  

eg :  $name = 'zhangsan';

$$name = 'lisi';

相当于声明了两个变量,一个是$name ,$zhangsan = 'lisi';

函数中的变量默认是动态的设置,调用完毕自动释放。

全局数组,可以在函数内部调用全局变量,$GLOBALS[];

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post