Bug report
I've a code which iterate on dates and perform some operations using DateTime::format('N') to loop over an array indexed by day in numeric format.
The code looks like something like this:
$from = new DateTimeImmutable('2023-01-30');
for ($offset = 1; $offset <= 14; $offset++) {
$value = $from->format('N') + $offset;
var_dump($value);
if ($value > 7) {
}
}
The previous code output number from 2 to 15, but phpstan considering that the condition is always false which is wrong.
Comparison operation ">" between 1|2|3|4|5|6|7 and 7 is always false.
Code snippet that reproduces the problem
Expected output
No error should be output.