🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

array_key_exists + ternary cause an improper type evaluation #11281

Description

@momala454

Bug report

when i use array_key_exists in a ternary condition, the last value type is not checked

Code snippet that reproduces the problem

https://phpstan.org/r/77b815da-653a-477f-92cb-50d04c52eaf4

Expected output

error because we can provide a string to a int parameter

Did PHPStan help you today? Did it make you happy in any way?

yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions