[php-src] PR #23607: Zend: Fix iterator relocation at the current element during rehash

From: Date: Mon, 07 Sep 2026 12:38:56 +0000
Subject: [php-src] PR #23607: Zend: Fix iterator relocation at the current element during rehash
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-38364@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/23607 Author: LamentXU123 Found when I am implementing #23585 ```php <?php $a = [0, 1, 2]; foreach ($a as &$outer) { foreach ($a as &$value) { echo $value, "\n"; if ($value === 1) { unset($a[0], $a[1]); $a['x'] = 3; } } break; } ``` Return ``` 0 1 ``` But I expect: ``` 0 1 2 3 ```

« previous php.git-pulls (#38364) next »