Tjerk Meesters wrote (on 13/12/2013):
Basically it makes the $x++ or ++$x work as if you types $x += 1 or
$x = $x + 1 (except for arrays, currently)
++null becomes int(1), --null becomes int(-1)
Yes please! One of my colleagues once raised a bug that currently incrementing null results in 1, but decrementing it results in it remaining null. On the other hand, null -= 1 results in -1 as you would expect.
The bug was closed as invalid, stating that this is documented behaviour, but I have never understood why this would be anything other than an accidental side effect of implementation, nor why you would ever rely on it.
++"123a" becomes "123b" but with a notice that string increment is
deprecated
Lukewarm on this part; the current syntax seems fairly logical to me, and the proposed new functions more ugly for no very good reason.
Regards,
--
Rowan Collins
[IMSoP]