PHPin_Array()/Array_Search()奇数行为
in_array()
$arr = [TRUE, "some string", "something else"];
"test"
in_array()
$result = in_array("test", $arr);var_dump($result); //Output: bool(true)
array_search()
:
$result = array_search("test", $arr);var_dump($result); //Output: int(0)
慕姐8265434
呼唤远方