Wanna test your server?

Mr Smiley

Senior member
Oct 12, 2004
550
1
0
So I found this code while reading PHP Cookbook. It's called a Look and See function. Basically, it will take the previous line and "say" the numbers. For example, here is the first 6 sequences of the loop:
1
11
21
1211
111221
312211
I was just wondering if anyone has a server that can handle this loop before execution time runs out. Default the loop will run 75 lines. Provide specs!
P4 @ 3.2
1 gig of ram
Segate 7200rpm hard drive
Fedora Core 4 LAMP
Completes 55 lines.
Edit: Might crash browser.
 

jjones

Lifer
Oct 9, 2001
15,424
2
0
Same here - 55 lines. This was in Firefox; only 52 lines running in IE. Don't know why there would be a difference.

Same specs as you but double the ram.
 

Mr Smiley

Senior member
Oct 12, 2004
550
1
0
O wow. The first time I tested it with Firefox. I just tested it in IE and it crashed the browser.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
It took 4m26.243s to run on my 300Mhz Ultra2. That's pure calculation though, I redirected the output to /dev/null though to take the I/O required to print the numbers out of the equation.

Edit: Actually it appears to have died, the limits I have PHP setup with don't allow it to allocate enough memory at some point.