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
substr_count() can't return a negative integer. Somehow PHPStan knows that on PHP 7 but not on PHP 8.
substr_count()
https://phpstan.org/r/1a52b064-480a-4891-826a-64f4f833ea41
No error.
The text was updated successfully, but these errors were encountered:
It's the opposite. PHP 7 doesn't require that argument to be int<0, max>.
int<0, max>
Fixed the signature of substr_count: phpstan/phpstan-src@8db058a
Sorry, something went wrong.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
No branches or pull requests
Bug report
substr_count()
can't return a negative integer. Somehow PHPStan knows that on PHP 7 but not on PHP 8.Code snippet that reproduces the problem
https://phpstan.org/r/1a52b064-480a-4891-826a-64f4f833ea41
Expected output
No error.
The text was updated successfully, but these errors were encountered: