All variables in PHP start with "$"
$a=5; $b=6
php variable naming rules(recommended Learning:PHP programming from entry to proficiency)
1. Case sensitive
$A and $a$ are two different variables, (system built-in structure and Keywords, user-defined class and function names are case-sensitive).
2. The variable starts with the $ symbol, followed by the name of the variable.
3. Variable names must start with letters or underscores and cannot start with numbers.
4. Variable names can only contain alphanumeric characters and underscores (A-z, 0-9 and _)
If the variable is composed of letters, all lowercase is usually used as the variable name. If the variable is made up of multiple characters, use all lowercase letters for the first letter and capitalize each subsequent letter.
The following variable naming is correct:
The above is the detailed content of What do the variables in php start with?. For more information, please follow other related articles on the PHP Chinese website!