Skip to content

Errors reported on command line, but not on website #3343

@cj-clx

Description

@cj-clx

Bug report

When I run command line version 0.12.25 against my code, it gives me this error message:
Unreachable statement - code above always terminates.

Yet running the same code against the analyzer at phpstan.org correctly produces no error messages, as date_parse() returns array on success and false on error.

Code snippet that reproduces the problem

https://phpstan.org/r/658ea856-cdd6-4490-8d5f-92b34e773e73

Expected output

Success (no error messages).

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