$ A3; $ b5; if ($ a5 | $ b7) {$ a ++; $ B ++;} echo $ a, $ B; the output result is: a, 68B, 66C, 26D, 16E, 46 think about it ..... the answer is 16 because ($ a5 | $ b7) can actually be written as ($ a (5 | ($ b7). Here we take the calculation priority. Second truetrue, this
$ A = 3; $ B = 5; if ($ a = 5 | $ B = 7) {$ a ++; $ B ++;} echo $ ,, $ B; output result: A, 6 8 B, 6 6 C, 2 6 D, 1 6 E, 4 6 think about it ..... the answer is 1 6 because ($ a = 5 | $ B = 7) can actually be written as ($ a = (5 | ($ B = 7 ))), the calculation priority is used here. The second value is true = true.
$a = 3;$b = 5;if($a = 5 || $b = 7){$a++;$b++;}echo $a, ' ', $b;
Output result:
A, 6 8
B, 6 6
C, 2 6
D, 1 6
E, 4 6
Think about it .....
The answer is 1 6.
Because ($ a = 5 | $ B = 7) can actually be written as ($ a = (5 | ($ B = 7), the calculation priority is used here.
The second value is true ++ = true. Here the incremental operation is used. The increment and decrement operations do not affect the Boolean value, but do not affect NULL. If you perform the increment operation on NULL, you will get 1. ProcessingCharacterDuring Variable arithmetic operations, PHP follows the Perl habit, rather than C. Character variables can only increase and cannot decrease.