Page 1 of 1

Infinite Loop

Posted: Wed Aug 28, 2002 8:54 am
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

Posted: Wed Aug 28, 2002 10:17 am
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

Posted: Wed Aug 28, 2002 10:27 am
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"

Posted: Wed Aug 28, 2002 12:58 pm
by edg
Sorry, my bad. First serve was a fault, second serve? :roll:

edg

Posted: Wed Aug 28, 2002 5:47 pm
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.

Posted: Wed Aug 28, 2002 6:56 pm
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. ;)