|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-05-07 16:23 UTC] mark at onelauter dot com
This works.
for ($i=0; $i < 13; $i++)
{
echo "$i ";
}
This gets stuck in an infinate loop.
for ($i=0; $i < 14; $i++)
{
echo "$i ";
}
Any value of 14 or greater results in the same problem.
It also occurs with while loops.
This works.
$i = 0;
while ($i < 13)
{
echo "$i ";
$i++;
}
This gets stuck in an infinate loop.
$i = 0;
while ($i < 14)
{
echo "$i ";
$i++;
}
The same problem will occur if I do this.
$i = 0;
while ($i < 13)
{
echo "$i ";
$i++;
}
for ($i=0; $i < 13; $i++)
{
echo "$i ";
}
Even though the loops would work indepedently, they won't work in the same php file.
I'm running as an ISAPI process with IIS 5 (inetinfo.exe version # 5.0.2195.3649). If I run the same test script on the command line with php.exe I don't have a problem.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 04:00:01 2025 UTC |
One new important development. I just figured out that its not the while loop or for loop that are generating the problem. This works. while ($i < 50) { $i++; } echo "$i "; However, if I put 14 echo statements in the file it fails. In other words, this works. echo "1"; echo "2"; ... lots of echos ... echo "13"; But if I add one more echo to the file it goes off into never never land.I don't know if it will help, but this sample also doesn't work. <?php for ($i=0;$i < 15;$i++) { ?> test <? } ?> There seems to be an issue with the output buffer. FWIW, I have buffering turned off to avoid the performance hit.