Skip to content

Report possibly-undefined variables in null-safe operator #7291

@ondrejmirtes

Description

@ondrejmirtes

Feature request

Null-safe operator still errors on undefined variables: https://3v4l.org/L7pHM

PHPStan should report Variable $a might not be defined. with this example: https://phpstan.org/r/c29b8386-5355-4135-b44c-fad3c50e987f

Inspired by this tweet: https://twitter.com/gonedark/status/1528765669600284674

Maybe @rajyan feels up to this? Thanks :)

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