[php-src] Issue #8073: Calling debug_backtrace in a foreach cycle restarts the foreach cycle
| From: | dstogov | Date: | Mon, 21 Mar 2022 18:23:33 +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-240446@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8073
Comment Author: dstogov
@cmb69 the difference between 7.2 and 7.3 is because of special handling of last element in 7.2 and
below. In case you change first line to `
$array = [1,2,3,4];` you'll get the same
output. I would say that modification of array iterated through foreach by reference may cause
undefined iteration behavior.