while cs. for

From: Date: Fri, 20 Aug 1999 17:18:09 +0000
Subject: while cs. for
Groups: php.dev 
Request: Send a blank email to php-dev+get-10035@lists.php.net to get a copy of this message
In some benchmarking I'm doing, while() loops are a little faster than equivalent for loops. Is this just a side-effect of how the parser rules are written? e.g, the two loops I'm comparing are: $j = 0; while ($j < $iter) { $a = 1; $j++; } and for ($j = 0; $j < $iter; $j++) { $a = 1; } -dave

« previous php.dev (#10035) next »