Posted by petermichaux on 10/11/05 00:33
Hi,
When I run either of the following scripts it runs to completion and
prints "end" if $limit<=1e4. If $limit>=1e5 then somewhere after many
loops the script stops and I do not see the final message "end". Is
there garbage I should be collecting? Am I hitting a type limit? Do php
scripts have any other limit that I might be hitting?
I'm confused!
Thanks,
Peter
//////////////////////////////////////////////
<?php
$limit = 1e4;
for ($i=0; $i<$limit; $i++)
{
$foo = array();
for($j=0; $j<100; $j++)
{
$foo[] = $j;
}
}
echo 'end';
?>
//////////////////////////////////////////////
<?php
$limit = 1e4;
$foo = array();
for ($i=0; $i<$limit; $i++)
{
for($j=0; $j<100; $j++)
{
$foo[$j] = $j;
}
}
echo 'end';
?>
Navigation:
[Reply to this message]
|