Home > Article > Backend Development > What is wrong with PHP variable names?
The incorrect PHP variable name is "$9thizBeijing" because PHP variable names must start with letters or underscore characters, and PHP variable names are case-sensitive.
#The operating environment of this article: Windows7 system, PHP7.1, Dell G3 computer.
What is the incorrect PHP variable name?
The incorrect PHP variable name is $9thizBeijing.
#This requires familiarity with PHP variable rules.
PHP variable rules are as follows:
Variables start with the $ symbol, followed by the name of the variable
The variable name must start with Start with a letter or underscore character
Variable name can only contain letters, numbers and underscores (A-z, 0-9 and _)
Variable name Cannot contain spaces
Variable names are case-sensitive ($y and $Y are two different variables)
PHP statements and PHP variables are case-sensitive.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What is wrong with PHP variable names?. For more information, please follow other related articles on the PHP Chinese website!