9.1 Constants
The numeric constants that are used as counter values in the For loop, except for -1,0 and 1, should not be written directly to the code.
9.2 Assigning values to variables
Avoid assigning the same value to multiple variables in a single statement. It's hard to read. For example:
$fooBar. Fchar = $barFoo. Lchar = C; Error
Do not use assignment operators in places that are easily confused with equality-relational operators. For example:
if ($c + + = $d + +) {//Error
...
}
should be written
if (($c + + = $d + +)! = 0) {
...
}
Do not use the inline (embedded) assignment operator to try to improve the efficiency of the runtime, which is the work of the compiler. For example:
$d = ($a = $b + $c) + $r; Error
should be written
$a = $b + $c;
$d = $a + $r;
http://www.bkjia.com/PHPjc/532581.html www.bkjia.com true http://www.bkjia.com/PHPjc/532581.html techarticle 9.1 Constants are numeric constants that are used as counter values in a for loop and should not be written directly to the code except for -1,0 and 1. 9.2 variable assignment avoid assigning the same to multiple variables in one statement ...