$a = $b = 0;
In the above code, are both $a and $b assigned the value of 0, or is $a just refer
$a
$b
0
Regard this code as:
$a = ($b = 0);
The expression $b = 0 not only assigns 0 to $b, but it yields a result as well. That result is the right part of the assignment, or simply the value that $b got assigned to.
$b = 0
So, $a gets assigned 0 as well.