9.1 constants are numeric constants in the for loop that act as counter values. except for-and 1, they should not be directly written into code. 9.2 assign a value to a variable to avoid assigning the same value to multiple variables in a statement. It is hard to understand. For example: $ fooBar. fChar $ barFoo. lcharc; // do not assign a value to SyntaxHighlighter. al.
9.1 constants
The numeric constant located in the for loop as the counter value, except for-and 1, should not be directly written into the code.
9.2 variable assignment
Avoid assigning the same value to multiple variables in a statement. It is hard to understand. For example:
$ FooBar. fChar = $ barFoo. lchar = c; // error
Do not use the value assignment operator in areas that are easily confused with equality operators. For example:
If ($ c ++ = $ d ++) {// error
...
}
It should be written
If ($ c ++ = $ d ++ )! = 0 ){
...
}
Do not use the embedded (embedded) assignment operator to improve runtime efficiency, which is the work of the compiler. For example:
$ D = ($ a = $ B + $ c) + $ r; // error
It should be written
$ A = $ B + $ c;
$ D = $ a + $ r;