[php-src] Issue #8073: Calling debug_backtrace in a foreach cycle restarts the foreach cycle
| From: | drealecs | Date: | Thu, 10 Feb 2022 10:41:58 +0000 |
| Subject: | [php-src] Issue #8073: Calling debug_backtrace in a foreach cycle restarts the foreach cycle | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-239603@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8073
Comment Author: drealecs
Altering the internal point before the foreach affects the result so it's related to that.
next($array): https://3v4l.org/tTLCk
end($array): https://3v4l.org/hHM2V
And also it's related to the fact that foreach is done on the function parameter that is
captured in backtrace.
Using DEBUG_BACKTRACE_IGNORE_ARGS for debug_backtrace() is also making the
issue go away: https://3v4l.org/hYN2r