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

From: Date: Sat, 03 Oct 2009 14:47:35 +0000
Subject: RE: [PHP] Whacky increment/assignment logic with $foo++ vs ++$foo
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-298524@lists.php.net to get a copy of this message
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

« previous php.general (#298524) next »