php variable declaration and storage method in memory
①Introduction to php variables
Description: The space that can store the changing amount (data), the changing amount is determined by the context . So it is called a weakly typed language.
②Memory area
Stack area Heap area Function area...
PHP automatically releases variables in memory
③Declaration of variables
Note: PHP variables are defined and declared by $. Variables need to be defined and declared in memory.
Syntax: $variable name = quantity
Note: The variable name is composed of numbers (0-9), letters (a-Z), and underscores, and cannot start with a number. A good variable name should make it clear what the name means.
Eg:
//变量的申明 $name = ‘张三’; $age = 18; $sex = true;
The above is the detailed content of About PHP variable declaration and storage method in memory. For more information, please follow other related articles on the PHP Chinese website!