I'm not sure if this is a bug or really not supported. But going with feature request for now.
<?php declare(strict_types = 1);
for($i = 5; $i < 4; $i++) {
loop();
}
function loop() : void {
echo 'Looping';
}
No error is detected. But it'd be nice to detect that this loop does not actually loop.
Feature request
I'm not sure if this is a bug or really not supported. But going with feature request for now.
For the given code:
https://phpstan.org/r/75344213-23a7-4c4d-9ac1-bb84d3f69b8e
No error is detected. But it'd be nice to detect that this loop does not actually loop.
(As a side note, when strict rules is enabled (https://phpstan.org/r/57404348-51b1-484e-958c-a2f1be351f68) there is a strange error message.
Only numeric types are allowed in post-increment, string given.)