php variables can be capitalized. PHP variable rules include: 1. Variables start with a $ symbol, followed by the name of the variable; 2. Variable names must start with letters or underscore characters; 3. Variable names can only contain Alphanumeric and underscore; 4. Variable names cannot contain spaces; 5. Variable names are case-sensitive.
#The operating environment of this article: Windows 7 system, PHP version 7.4, Dell G3 computer.
php Can’t capitalize variables?
php variables can be in uppercase letters.
Variables can have very short names (such as x and y) or more descriptive names (such as age, carname, totalvolume).
Variables are "containers" used to store information.
PHP variable rules:
Variables start with the $ symbol, followed by the name of the variable
Variable names must start with letters or underscore characters
Variable names can only contain letters, numbers and underscores (A-z, 0-9 and _)
Variable names cannot contain spaces
Variable names are case-sensitive ($y and $Y are two different variables)
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of Can PHP variables not be capitalized?. For more information, please follow other related articles on the PHP Chinese website!