Skip to content

Isset on parse_url returned type not working #8068

@alexander-schranz

Description

@alexander-schranz

Bug report

The isset returns an error in phpstan on parse_url:

$urlParsed = parse_url($url);

return isset($urlParsed['path']);

I'm not understanding. Found similar issue here from @darkspock maybe he can also tell why he thought it is not an error on phpstan side.

Code snippet that reproduces the problem

https://phpstan.org/r/e895b82e-932d-43a6-b184-c6e1a20ecc4b

Expected output

No error should be returned.

Did PHPStan help you today? Did it make you happy in any way?

Adding phpstan to a external project not using static code analyse yet and see lot of things which can improve also from architecture point of view avoiding inheritance and use strict type classes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions