Re: [PHP] for/foreach speed

2007-08-26 Thread Richard Lynch
On Mon, August 20, 2007 11:50 am, Sascha Braun, CEO @ fit-o-matic wrote: could somebody please explain me, what loop construct is faster? The for, while or foreach. If you are doing anything where the speed of for/while/foreach matters, you shouldn't have done that in PHP in the first place,

[PHP] for/foreach speed

2007-08-20 Thread Sascha Braun, CEO @ fit-o-matic
Hi people, could somebody please explain me, what loop construct is faster? The for, while or foreach. I at the moment don't know if there are more. And thanks to the person who is missusing the list here for sending trojan horses everywhere. Since I write to the PHP General list I am

Re: [PHP] for/foreach speed

2007-08-20 Thread Robert Cummings
On Mon, 2007-08-20 at 18:50 +0200, Sascha Braun, CEO @ fit-o-matic wrote: Hi people, could somebody please explain me, what loop construct is faster? The for, while or foreach. I haven't bothered testing but I'd wager $5 that the following is the fastest loop: ?php while( 1 ) { } ?

Re: [PHP] for/foreach speed

2007-08-20 Thread Sascha Braun, CEO @ fit-o-matic
Thank you very much. When we might have time for testing we can wager :)) Am Montag, den 20.08.2007, 13:21 -0400 schrieb Robert Cummings: On Mon, 2007-08-20 at 18:50 +0200, Sascha Braun, CEO @ fit-o-matic wrote: Hi people, could somebody please explain me, what loop construct is