php-Assignment Value

Source: Internet
Author: User

Assign value
解释:变量在PHP有一个变量表,可以理解为一个班级的花名册,变量名在这里统一存放而花名册里面放的全是变量名变量名指向具体的位置,我们简称盒子吧而这个具体的盒子里面装着变量的值 和类型
Assignment value of variable assignment
例子:$li = 29;$wang = 23;$wang = $li;var_dump($li,$wang);输出结果:int 29        int 29然后再单独更改他们的值 他们是互不相干的, 这是传值赋值
Assignment of a reference to a variable assignment value
例子:$li = 29;$wang = 23;$wang = &$li; //加了个&的符号,就表示是直接读取$li的值地址了。而不是只取它的值,//两者都是同一个地址,所以,两个变量随便一个更改值 都会影响另外一个变量的值var_dump($li,$wang);  //结果是 29 29 $wang = ‘www‘;var_dump($li,$wang); // 结果是 ‘www‘ ‘www‘

php-Assignment Value

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.