Question: It is not clear the logic behind this PHP code to give out the answer 19. How can the answer be 19? What is the logic? 

```
$i=5;
$i +=$i++ + ++$i;
echo $i;

```

Answer: 
```
$i=5;
$i +=$i++ + ++$i;
     ^
     Take value of $i as 5 then increment to 6
              ^
              increment value of $i from 6 to 7, and use the 7
          ^
          5 + 7 = 12
   ^ $i is already 7, because of the increments in the previous operations,
     so add the 12 we've just calculated, giving 19

```
```
$i += $i++ + ++$i ; 
$i = $i + ($i+1 + 1+$i);
19 = 7 + (5 + 7);

```