-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Labels
Description
Bug report
Trying to match against gettype does not work as expected.
This problem is maybe related also to this:
#4451
Code snippet that reproduces the problem
https://phpstan.org/r/db68feed-2dbb-43b8-bbb5-f7acbc65ef9e
Expected output
This code handle all possible results, following the function definition:
#[Pure]
#[ExpectedValues([
"boolean", "integer", "double", "string", "array", "object", "resource", "NULL", "unknown type", "resource (closed)"
])]
function gettype(mixed $value): string {}
PHPStan also does not seems to understand that in line 11 the type of $value is narrowed and cannot be object or array
Reactions are currently unavailable