& Amp; quot; heterogeneous & amp; quot; syntax: $ a & amp; $ B $ c; in php. A heterogeneous syntax in php: $ a $ B $ c;, a heterogeneous syntax in php: $ a $ B $ c; $ a1; $ b2; $ c3; $ a $ B $ c; echoa: $ a; echob: $ B; echoc: $ c; this is a "heterogeneous" syntax in a: 1b php: $ a & $ B = $ c;, php heterogeneous
A "heterogeneous" syntax in php: $ a & $ B = $ c;
$ A = 1;
$ B = 2;
$ C = 3;
$ A & $ B = $ c;
Echo "a: $ ";
Echo "B: $ B ";
Echo "c: $ c ";
In this case
A: 1
B: 3
C: 3
$ A = 0;
$ B = 2;
$ C = 3;
$ A & $ B = $ c;
Echo "a: $ ";
Echo "B: $ B ";
Echo "c: $ c ";
In this case
A: 0
B: 2
C: 3 resolution: 1: & the priority of the value assignment operator "=" is & the priority is high, however, in the red writing method, not $ a and $ B are first computed and then = $ c. This understanding is equivalent to 1 = $ c, 1 = $ c is incorrect. 2: The correct way to understand this alternative method is: if ($ a) {$ B = $ c }, that is, if $ a is true, the value assignment statement $ B = $ c is executed; otherwise, the value assignment statement is not executed, which is not hard to understand.
Syntax $ a $ B = $ c;, a "heterogeneous" syntax in php's heterogeneous php: $ a $ B = $ c; $ a = 1; $ B = 2; $ c = 3; $ a $ B = $ c; echo "a: $ a"; echo "B: $ B"; echo "c: $ c "; this is a: 1 B...