RE: Whacky increment/assignment logic with $foo++ vs ++$foo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 2:28 PM -0700 10/2/09, Daevid Vincent wrote:
My problem isn't with $foo++ vs ++$foo per say. I use pre/post all the time.

My issue is that I see no reason to do the ASSIGNMENT FIRST and THEN
INCREMENT.

I see your point exactly.

The problem is with the statement of:

$num = $num++;

That statement is just bad form. The increment is never realized.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux