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
{{ message }}
Repository navigation
Explicit mixed array becomes implicit in if statement #10559
Activity
ondrejmirtes commentedon May 30, 2024
Pasting level 9 playground: https://phpstan.org/r/12321291-c13b-4a0d-8a15-6061b5e981fa
phpstan-bot commentedon Oct 12, 2024
@uh-zuh After the latest push in 2.0.x, PHPStan now reports different result with your code snippet:
Full report
Dumped type: array<mixed>Dumped type: mixedDumped type: array&hasOffsetValue('a1', mixed)Dumped type: mixedphpstan-bot commentedon Oct 12, 2024
@ondrejmirtes After the latest push in 2.0.x, PHPStan now reports different result with your code snippet:
Full report
Dumped type: array<mixed>Dumped type: mixedCannot cast mixed to string.Dumped type: array&hasOffsetValue('a1', mixed)Dumped type: mixedphpstan-bot commentedon Oct 13, 2024
@uh-zuh After the latest push in 2.0.x, PHPStan now reports different result with your code snippet:
Full report
Dumped type: array<mixed>Dumped type: mixedDumped type: non-empty-array&hasOffsetValue('a1', mixed)Dumped type: mixedphpstan-bot commentedon Oct 13, 2024
@ondrejmirtes After the latest push in 2.0.x, PHPStan now reports different result with your code snippet:
Full report
Dumped type: array<mixed>Dumped type: mixedCannot cast mixed to string.Dumped type: non-empty-array&hasOffsetValue('a1', mixed)Dumped type: mixedphpstan-bot commentedon Feb 26, 2026
@uh-zuh After the latest push in 2.2.x, PHPStan now reports different result with your code snippet:
Full report
Dumped type: array<mixed>Dumped type: mixedDumped type: non-empty-array<mixed>&hasOffsetValue('a1', mixed)Dumped type: mixedphpstan-bot commentedon Feb 26, 2026
@ondrejmirtes After the latest push in 2.2.x, PHPStan now reports different result with your code snippet:
Full report
Dumped type: array<mixed>Dumped type: mixedCannot cast mixed to string.Dumped type: non-empty-array<mixed>&hasOffsetValue('a1', mixed)Dumped type: mixedCannot cast mixed to string.phpstan-bot commentedon Feb 26, 2026
Closed via merging phpstan/phpstan-src#5050
github-actions commentedon Mar 30, 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.