note 94583 deleted from language.operators.increment by danbrown

From: Date: Thu, 12 Nov 2009 23:52:30 +0000
Subject: note 94583 deleted from language.operators.increment by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-162838@lists.php.net to get a copy of this message
Note Submitter: jellestege at gmail dot com ---- at daevid at daevid dot com, "Why would you EVER want $num = $num++; to give you back the value you already had? " Consider the following script: <?php $i = 0; while ( $i < 10 ) { printf("%d",$array[$i++]); } ?> If you increment $i before returning it, the initial value of $i should be -1.

« previous php.notes (#162838) next »