Re: Maximum function nesting level of '100' reached

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jochem Maas wrote:
> T.Lensselink wrote:
>   
>
> ...
>
>   
>>> php -r 'function foo() { static $x = 1; echo "foo ", $x++, "\n"; foo(); }
>>> foo();'
>>>
>>> ...
>>>
>>>       
>>>> Running your code shows that there is a limit. Although it doesn't throw
>>>>         
>>> an
>>>       
>>>> error.
>>>> It just stops after n recursive calls:
>>>>
>>>> php4 recursive calls:   796
>>>> php5 recursive calls: 49841
>>>> php6 recursive calls:  6007
>>>>         
>>> A. this is not the output of the script
>>>       
>> That's true. i never said it was... or did i?
>>
>>     
>>> B. do you think these numbers are the same for everyone?
>>> heck they're not even garanteed to be the same between 2 runs
>>> on the same machine with the same php binary.
>>>       
>> No i don't think it will be the same on all systems. I also didn't say
>> that.
>> You make to much assumptions.
>>     
>
> that should be "You make too many assumptions" and no that is not the case,
> I was trying to point out that the number you showed us were arbitrary and
> completely nonindicative (of anything).
>   
Nonindicative? It indicates there is no segfault on my system. Or
doesn't it?
And it indicates there is some sort of a limit on the system i used.
>   
>>> C. it doesn't just stop, a segmentation fault occurs.
>>>       
>> No it doesn't segfault. Well atleast it doesn't here. 
>>     
>
> then you have a php binary built with customized source code I
> presume.
>
>   
I have no modified source code.
>> error_reporting on. Xdebug enabled... No segfaults.. It just stops after
>> (n) recursions.
>>     
>
> yes and display_errors is OFF - look in your php error log.
>   
display_errors is "ON" what use would xdebug be without it?
Stop patronising.
>   
>>> Therfore there is NO recursion limit in php (not withstanding a specific
>>> limit
>>> in functions belonging to an XML extention). the percieved limit is php
>>> running
>>> out of memory ... as long as there is memory php will continue to
>>>       
>> recurse.
>>
>> I didn't say there is a recursion limit. I just confirmed the output of
>> running your "test" script.
>>     
>
> you implied that there was a limit when you said 'it just stops',
> 'it just stops' is not the same thing as a segmentation fault occuring.
> or did you mean something like 'it just stops when you concentrate really hard
> on your computer', or maybe you're implying that php has just aquired
> self-awareness and is arbitrarily deciding when to put a stop to your recursion?
>   
You're right on this one. I wasn't very clear. I meant to say it seems
like there is a limit.
Because "your" script stops after (n) recursive calls. The rest of this
nonsence comment
i'm not even gonna reply to.
>   
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>       
>
>
>   
I thought we were here to help eachother? But the only thing that comes from
you are answers like in this thread "e-mail code". Very helpfull.

It's friday. Have a beer and relax!

gr,
Thijs

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux