Posted by Jerry Stuckle on 10/11/05 04:13
petermichaux@yahoo.com wrote:
> 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';
>
> ?>
>
Or are you hitting the php timeout limit (default 30 seconds)?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|