Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Offset string&numeric on array<string, string> in isset() does not exist #4671

@BackEndTea

Description

@BackEndTea

Bug report

Casting an int to a string, and then using isset with that key for an array with string keys reports that it can never exist.

Code snippet that reproduces the problem

https://phpstan.org/r/9ecc3acb-f438-4cd8-9490-05601d4bd7ee

Expected output

No errors

Potentially related to #4163

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions