Skip to content

Cannot use backslash as a literal string in conditional return type #142

@mad-briller

Description

@mad-briller

i can't get phpstan to recognise \\ in a literal string:
https://phpstan.org/r/41f1530f-eaee-4e7d-8bfc-e7ccc7cfc7a7

using any other sting there makes it work just fine:
https://phpstan.org/r/a884b37d-682b-45a4-b891-1725ffd1c428

Originally posted by @mad-briller in phpstan/phpstan#7483 (comment)

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