mercredi 20 avril 2016

Why is this variable only incrementing once? [duplicate]

This question already has an answer here:

$x = 5; 
$x = $x++ + $x++; 
echo $x;

The output is:

11

Why does it ignore the second increment, which I would expect results in 13?




Aucun commentaire:

Enregistrer un commentaire