我有以下数组:
$array = array (
'a' => 'A',
'b' => 'B',
'c' => 'C'
);
我想了解这种行为:
// true, normal behaviour, there is a 'A' value in my array
echo array_search('A', $array) === 'a';
// true, normal behaviour, there is no 1 value in my array
echo array_search(1, $array) === false;
// true ???? there is no 0 as value in my array
echo array_search(0, $array) === 'a';
为什么array_search(0, $array)
返回我的数组的第一个键?