News for hackers. Stuff that matters.
Re:Why doesn't this code simply return a to z as the output? by zackattack on Friday November 05, 2010 @01:22AM (#1872136)
'z'++ is not 'aa'. 'z'++ is not even valid PHP. $z='z';$p=$z++; does nothing either.

it's only in the for-loop context.

Re:Why doesn't this code simply return a to z as the output? by Nitramp on Friday November 05, 2010 @06:24AM (#1872631)
Not really, after $p = $z++ $p is 'z', $z is 'aa', as you'd kind-of expect. But the difference between literals and expressions/variable references of course just adds icing to the cake of bizareness.
Re:Why doesn't this code simply return a to z as the output? by rythie on Friday November 05, 2010 @06:48AM (#1872667)
try...

<?php $z='z'; echo ++$z;

which produces 'aa'