I have a foreach function that calls a recursive function to obtain a subset. There are 36 records in total. When I get to the 16th record, I get an error
<code>Maximum function nesting level of '100' reached, aborting! in </code>
This shouldn’t be an endless loop, right?
Code pictures
I have a foreach function that calls a recursive function to obtain a subset. There are 36 records in total. When I get to the 16th record, I get an error
<code>Maximum function nesting level of '100' reached, aborting! in </code>
This shouldn’t be an endless loop, right?
Code pictures
This is the limit of the entire call stack. You can call the debug_backtrace
method to get the current stack depth
http://php.net/manual/en/func...
<code>function test() { echo count(debug_backtrace()) . "\n"; } function test2() { test(); } test(); //输出1 test2(); //输出2 </code>