PHP array_intersect does not have any option for strict type checking as they have given in_array
$array1 = array(true,2);
$array2 = array(1, 2, 3, 4, 5, 6);
var_dump(array_intersect($array1, $array2));
result is :
array(2) {
[0] => bool(true)
[1] => int(2)
}
where expected result is
array(1) {
[0] => int(2)
}
Am I missing something ?
May be question is duplicated with PHP array_intersect() - how does it handle different types?