# 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.