Php Naming Conventions Variables
Php Naming Conventions Variables :
1. A variable value can have alpha numeric characters and underscore.
2. A variable name should start with a letter and underscore.
3. No space is allowed between the characters of a variable name.
4. Variable names are case sensitive.
5. It is advisable not to use the reserved keywords of php as a variable name.
Ex : $firstName
6. Dot operator (.) operator is the concatenation operator used in php.
$firstName = “india”;
$_age = 25;
Note : If we use a variable in double quotes(“ “) self expansion of the variable will happen where the memory usage is more.
So we should not use a variable in double quotes(“ “).