-
-
Notifications
You must be signed in to change notification settings - Fork 946
Open
Labels
Milestone
Description
Bug report
I thought the bug was already fixed in the last version (#10956), but it seems, that it was solved only partially.
Strict comparison using === between mixed and array{NAN} will always evaluate to false.
In PHP every value, include array with NAN on any depth level IS equal to itself, even when you assign one variable to another (increasing refcount, but keeping same zval).
Example:
$a = [NAN];
assert($a === $a);
/** @var mixed $b */
$b = $a;
assert($b === $b);
assert($b === $a);
assert($b !== [NAN]); // other zvals's are compared structurally with the rule that NAN !== NAN.Code snippet that reproduces the problem
https://phpstan.org/r/c56b5606-3a01-42b2-8c77-c03483568949
Expected output
No error
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable