Skip to content

False negative with get_include_path() on PHP8 #4203

@ste93cry

Description

@ste93cry

Bug report

PHPStan on PHP 8 is ignoring the fact that the get_include_path() function can only return a string in a comparison statement. It works as expected on lower versions

Code snippet that reproduces the problem

https://phpstan.org/r/8a425e74-cdb8-4c25-aca5-809c90f7cdf0

Expected output

PHPStan should complain on PHP8 like it does with prior versions

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