At 6:15 PM -0700 10/6/09, Daevid Vincent wrote:
Except that:

$a = 123;
$b = $a++;
echo $b;  //gives 123, not 124

as you logically expect it to and common sense would dictate, regardless of
what K&R or anyone else says.

That's not the way I look at it.

   $b = $a++;

means to me "take the value of $a and assign to $b and then increment $a."


   $b = ++$a;

means to me "increment $a and take the value of $a and assign to $b."




PHP General Mailing List (
To unsubscribe, visit:

Reply via email to