PHP 8.5.0 Released!

Voting

: zero minus zero?
(Example: nine)

The Note You're Voting On

matang dot dave at gmail dot com
10 years ago
Take care of value types while using array_intersect function as there is no option for strict type check as in in_array function.

$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)
}

<< Back to user notes page

To Top