Infinite Loop

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
Edg

Infinite Loop

Post by Edg »

Who can make the most resource tieing infinite loop? The idea is to incroprate to most confusing set of resources into the loop without letting it finish.

Simple Start :

Code: Select all

<?php
for ($i=1, $i<$i+1, $i++) &#123;
print ("No, it's a loop!");
&#125;
?>
I'm sure someone can do something stupid, annoying and higly resourseful :D

edg
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

Code: Select all

<?php 
for ($i=1, $i<$i+1, $i++) &#123; 
$anarray&#1111;] = "some spam?";
print ("No, it's a loop!"); 
foreach($anarray as $key => $value)&#123;
echo $key." "." "." "." "." ".$value; &#125;
&#125; 
?>
just made an array to add on to the clutter
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Code: Select all

<?php 
for ($i=1; $i<$i+1; $i++) &#123; 
$anarray&#1111;] = "some spam?"; 
foreach($anarray as $entry)
	$anarray&#1111;] = md5($entry);
print ("No, it's a loop!"); 
foreach($anarray as $key => $value)&#123; 
echo $key." "." "." "." "." ".$value; &#125; 
&#125; 
?>
if we are strict, the contest has been over before it begun
for ($i=1, $i<$i+1, $i++)
must be

Code: Select all

for ($i=1; $i<$i+1; $i++)
or you get "parse error, unexpected ')', expecting ';' in xyz.php on line 2"
edg
Forum Newbie
Posts: 11
Joined: Wed Aug 28, 2002 12:58 pm

Post by edg »

Sorry, my bad. First serve was a fault, second serve? :roll:

edg
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

Code: Select all

<?php 
for ($i=1; $i<$i+1; $i++) &#123; 
$anarray&#1111;] = "some spam?"; 
foreach($anarray as $entry) 
   $anarray&#1111;] = md5($entry); 
print ("No, it's a loop!"); 
foreach($anarray as $key => $value)&#123; 
echo $key." "." "." "." "." ".$value; &#125; 
set_time_limit ("60"); /* UH OH, Let's start the counter over! */
&#125; 
?>
now it won't fux0r up at 30 seconds, i think.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Code: Select all

<?php 
for ($i=1; $i<$i+1; $i++) &#123; 
$anarray&#1111;] = "some spam?"; 
foreach($anarray as $entry) 
   $anarray&#1111;] = md5($entry); 
print ("No, it's a loop!"); 
print('<table>');
foreach($anarray as $key => $value)&#123; 
echo '<tr><td>'.$key."</td> "." "." "." "." <td>".$value."</td></tr>"; &#125; 
print('</table>');
set_time_limit ("60"); /* UH OH, Let's start the counter over! */ 
&#125; 
?>
let the browser burn, too. ;)
Post Reply