-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Labels
Description
Bug report
When using array_uintersect in PHP8 phpstan returns error:
Parameter #3 ...$rest of function array_uintersect expects array, string given.
However the same error is not returned when using PHP7. Also what is interesting here https://3v4l.org/4MMeU that reflection api reports other parameters of the function for PHP 8, maybe it's actually PHP bug?
Code snippet that reproduces the problem
<?php declare(strict_types = 1);
$array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red");
$array2 = array("a" => "GREEN", "B" => "brown", "yellow", "red");
print_r(array_uintersect($array1, $array2, "strcasecmp"));Here is link to playground - https://phpstan.org/r/fe236064-884e-48ae-bd28-fbd452c9ec7c
Expected output
No errors!
Reactions are currently unavailable