Skip to content

Wrong error message when use variable from other code blocks #8430

Closed

Description

@mcsknp

https://phpstan.org/r/5f9cfe4b-86ce-41fd-b099-9a0b5a6fc458

Wrong error at line 94 because $arr is defined at line 43
The conditions at line 42 is always true if conditions at line 93 is true

Activity

  1. mcsknp commented on Nov 29, 2022

    @mcsknp
    Author
  2. added this to the Dependent types milestone on Nov 29, 2022
  3. phpstan-bot commented on Mar 4, 2026

    @phpstan-bot
    Contributor

    Closed via merging phpstan/phpstan-src#5125

  4. github-actions commented on Apr 5, 2026

    @github-actions

    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.

  5. locked as resolved and limited conversation to collaborators on Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions