This is the last summary of the basic PHP language. we will not introduce some of C and C ++, we will introduce three functions of variable management in PHP, indirect reference of variables, Super global variables & middot;, single double quotation marks, delimiters, and others, which are the same as those of C and C ++. 04.01 variable management three functions: isset (), unset (),... "/> <scripttype =" text/javascript: this is the last summary of the basic PHP language. we will not introduce some of C and C ++, we will introduce three functions of variable management in PHP, indirect reference of variables, Super global variables, single double quotes, delimiters, and others, just like C and C ++. 04.01 three functions of variable management: isset (), unset (), and empty (). one is to determine whether a variable exists, and the other is to release a variable (releasing memory, if there is only one point to the change volume, or the memory corresponding to the variable has no alias, otherwise the variable is released, remember that the php variable is essentially a pointer.) eg: $ name = "sususu" $ test = & $ name; unset ($ name); print $ name; // an error occurs. Print $ test; // it can be inferred that unset releases two parts of memory, one is the memory occupied by $ name itself, and the other is the memory directed to the address by $ name. The empty () function is used to determine whether a variable exists, whether it is assigned a value if it exists, and whether it is false if it is assigned a value, if yes, true 04.02 is returned. the indirect reference of the variable is called the indirect reference of the variable. that is, the value stored in the variable can be used as the variable name. $ Name = "aaa" $ name = "bbb"; print aaa; // output the bbb 04.03 Super global variable $ _ GET [], $ _ POST [], $ SERVER [], $ COOKIE [], $ _ ENV [], which can be used as the C language global Array access at any location. 04.04 single quotes and double quotes can parse variables in a string, but single quotes cannot. Therefore, the efficiency is high, of course! Except that single quotes can only parse the escape single quotes \ 'and escape backslash \\
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