Quiz
We found a small bug in our codebase the other days, which led to a funny discussion about how PHP acts in different situations.
Try look at the following example. What will $i be?
$i = 10;
$i = $i + 2 + $i = $i + 5;
echo $i;
Give an answer before you plot it in the console
Ruby will give the same answer:
i = 10
i = i + 2 + i = i + 5
puts i
Here is another one:
$d = 0;
$d = 2 + $d == $d = $d + 2;
echo $d;