You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Correct me if I'm wrong, but I don't see the issue here 🤔 If I call isOkOrNot('compact', null); this will invoke displayOk(null);. So this is a flaw in your logic, not PHPStan
Activity
swissspidy commentedon Aug 15, 2023
Correct me if I'm wrong, but I don't see the issue here 🤔 If I call
isOkOrNot('compact', null);this will invokedisplayOk(null);. So this is a flaw in your logic, not PHPStanlugosium commentedon Aug 15, 2023
if type
compactor4x4and car is null you will enter theif, inelseifyou car is necessarily an object, cannot be null.nuryagdym commentedon Aug 29, 2023
in_arraydoes not work for me also.Here is another example https://phpstan.org/r/4cbdb7cd-ab24-4a52-a816-b1e378cc11b4
mad-briller commentedon Aug 29, 2023
@nuryagdym phpstan doesn't work well with loose equality semantics right now, pass a third arg of
truetoin_arrayand it's fine:https://phpstan.org/r/43426488-3c0a-4584-8b2a-a71ac97d85cc
phpstan-bot commentedon Aug 13, 2024
@nuryagdym After the latest push in 1.12.x, PHPStan now reports different result with your code snippet:
phpstan-bot commentedon Sep 11, 2026
Closed via merging phpstan/phpstan-src#6381
github-actions commentedon Oct 13, 2026
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.