### Bug report Since 2.3.0, PHPStan reports a `for` loop condition as always true, as if the loop could only run once. 2.2.17 does not report it. ```php class Test { /** @param string[] $cards */ public function f(array $cards): void { for ($i = 0; $i < 10; $i++) { $seen = []; $later = []; foreach ($cards as $card) { if (array_key_exists($card, $seen)) { $later[] = $card; continue; } $seen[$card] = true; } if ($later !== []) { $cards = $later; } else { break; } } } } ``` ### Code snippet that reproduces the problem https://phpstan.org/r/521b79d1-abc0-4acb-a5c4-d43038643830 ### Expected output No errors ### Did PHPStan help you today? Did it make you happy in any way? _No response_
Activity