8.4 Variables
In addition to the variable name, all instances, including classes, class constants, are mixed in case, the first letter is lowercase, and then the first letter of the word is capitalized. The variable name should not begin with an underscore or dollar sign, although this is syntactically permissible.
Variable names should be short and descriptive. The choice of variable name should be easy to remember, that is, can indicate its use. Try to avoid the variable name of a single character unless it is a one-time temporary variable. Temporary variables are usually named I,j,k,m and N, which are generally used for integer types; c,d,e, which are generally used for character types.
Char $c;
int $i;
float $myWidth;
8 Instance variables
Casing rules are similar to variable names, except that you need an underscore before
int $_employeeid;
String $_name;
Customer $_customer;
8.6 Constants
The declarations of class constants and ANSI constants should all be capitalized, and the words should be separated by underscores. (Avoid ANSI constants and easily cause errors)
static final int $MIN _width = 4;
static final int $MAX _width = 999;
static final int $GET _the_cpu = 1;
http://www.bkjia.com/PHPjc/532582.html www.bkjia.com true http://www.bkjia.com/PHPjc/532582.html techarticle 8.4 variables except for variable names, all instances, including classes, class constants, are mixed in case, the first letter is lowercase, and then the first letter of the word is capitalized. Variable ...