We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code creates a false positive error in Psalm 1.1.4 (it worked fine up to Psalm 1.1.3):
<?php $i = 5; do {} while (--$i > 0); echo $i === 0;
The condition $i === 0 evaluates of course to true after the loop finishes.
$i === 0
Demonstration of this issue: https://getpsalm.org/r/556d8678bc
Psalm doesn't complain when using a while-loop:
<?php $i = 5; while (--$i > 0) {} echo $i === 0;
Demostration: https://getpsalm.org/r/2fed4dd9ca
The text was updated successfully, but these errors were encountered:
PR #853 provides a test case for this behaviour.
Sorry, something went wrong.
bca3b17
No branches or pull requests
The following code creates a false positive error in Psalm 1.1.4 (it worked fine up to Psalm 1.1.3):
The condition
$i === 0
evaluates of course to true after the loop finishes.Demonstration of this issue: https://getpsalm.org/r/556d8678bc
Psalm doesn't complain when using a while-loop:
Demostration: https://getpsalm.org/r/2fed4dd9ca
The text was updated successfully, but these errors were encountered: