Skip to content

Result of in_array stored into variable is not enought for PHPStan array_shift(#1) #2980

@Zarganwar

Description

@Zarganwar

Bug report

PHPStan 0.12.10

Test for array type before using array_shift() function doesn't work if result of test is stored into variable.

Code snippet that reproduces the problem

https://phpstan.org/r/77b64d46-6237-41d5-bf76-0dff0b17ad08

Expected output

All three variants written in code snippet are same but they have not same result.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions