for loops

I read this over at TheDailyWTF and promptly had to clean coffee off of my monitor. This has to be the greatest for loop ever written!

$i = 0;
for (;;) {
$i++;
...
if ($i >= 15) break;
}

Now go clean whatever beverage you were drinking off of your monitor, and don’t blame me! I warned you!

(and for those non-coders reading, the entire thing can be replaced with for($i=0 ; $i < 15 ; $i++) { ... })

Tags: php

Leave a Reply

:D :) ;) :( :o :shock: :? More smilies »



Users Online

Registered users: No registered users
In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 217 on Fri May 17, 2013 10:14 pm
Legend: Administrators, Global moderators