PHP Learning-variable variables, variable variables
Variable variable
Sometimes it is convenient to use variable variable names. That is, the variable name of a variable can be set and used dynamically. An ordinary variable is set by a declaration,
variable Variable
Sometimes it is convenient to use variable variable names. That is, the variable name of a variable can be set and used dynamically. An ordinary variable is set by a declaration, for example:
A mutable variable gets the value of
Variable variables, the variable names of a variable can be dynamically set and used. Syntax form is a special syntax for PHP, which is rare in other languages.
Sometimes it is convenient to use variable variable names. That is, the variable name
The usual variables are named by the following statements:
Copy CodeThe code is as follows:
$a = ' Hello ';
?>
A mutable variable name refers to the use of a variable's value as the name of the variable. In the example above, by using two $
Sometimes mutable variable names can be a great convenience for programming. This means that variable names can be dynamically named and used. Usually variables are named by the following statements:
Variable variable name refers to the use of a
Usually variables are named by the following statements:
Copy Code code as follows:
$a = ' Hello ';
?>
Variable variable name refers to the use of a variable's value as the name of the variable. In the example above, by
Sometimes mutable variable names can be a great convenience for programming. This means that variable names can be dynamically named and used. Usually variables are named by the following statements:
? PHP
$a = ' hello ';
Sometimes variable names can be a great convenience for programming. This means that variable names can be dynamically named and used. The usual variables are named by the following statements:
$a = ' Hello ';
?>
A mutable
Sometimes mutable variable names can be a great convenience for programming. This means that variable names can be dynamically named and used. Usually variables are named by the following statements:
$a = ' hello ';Variable variable name refers to
Computer is rigid fixed, people are active open, beginner C # The first day to give me the feeling is: employing active open-minded thinking to the computer to communicate with, find temper, conducive to both sides in-depth cooperation, which is the
PHP variable definition, variable, variable reference, and destruction method. Copy the code as follows :? Php $ longbig_long_variable_name; $ longPHP; * Use a string stored in the variable $ long as the variable name of the new variable, equivalent
The so-called mutable variable is the name of a variable and a variable.The syntax for mutable variables is a very special syntax for PHP--rare in other languages.1 $v 1 = "abc"; // This is a string variable whose content is the string "abc"
1 Creating a console program> New Project, select C #, frame Select 4.0, select Control application program, select File save location to modify name.2 C # output and input> Writing code in the main function> can insert Console.ReadLine () at the
statement:Original Works,when reproduced, please indicate the article fromThe SAP division is tooTechnology Blog ( Bo/guest/Park www.cnblogs.com): Www.cnblogs.com/jiangzhengjun,and indicate the original source of the article in the form of a
PHP variable definition, variable, variable reference, and destruction method
This article mainly introduces the definition of PHP variables, variable variables, variable references, and destruction methods. For more information, see
The Code is as
legb rule /LEGB rule LEGB variable search order ----from the Python Learning manual/ learning python Page 419----Python's variable name resolution mechanism is called the LEGB rule.L–local: local scope;E–enclosing: The local scope of def or lambda
The shell supports custom variables.Defining variablesWhen defining a variable, the variable name does not have a dollar sign ($), such as:
VariableName="value"
Note that there can be no spaces between the variable name and the equals
Copy codeThe Code is as follows:$ Long = "big_long_variable_name ";$ Long = "PHP";/* use the string stored in the variable $ long as the name of the new variable, equivalent to $ big_long_variable_name = "PHP ";*/$ Short = & $ big_long_variable_name;
This article mainly introduces the definition of PHP variables, variable variables, variable references, and destruction methods. For more information, see
The code is as follows:
$ Long = "big_long_variable_name ";
$ Long = "PHP";/* use the
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.