At 9:10 AM +1100 12/23/08, Clancy wrote:
Schlossnagle (in "Advanced PHP Programming") advises:
$i = 0; while ($i < $j)
{
........
++$i;
}
rather than:
$i = 0; while ($i < $j)
{
.......
$i++;
}
as the former apparently uses less memory references. However I
find it very hard to
Two things:
1. One statement, one line.
2. The code between the two examples is different; produces different
results; and thus is rather pointless in making a definitive
comparison.
Assignment, demonstrate a correct way to test ++i vs i++.
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