PHP的一個坑--in_array

今天在找問題的時候發現了一個小坑。 in_array定義: in_array ( mixed $needle , array $haystack [, bool $strict = FALSE ] ) : bool 着重說一下第三個參數。 strict 如果第三個參數 strict 的值爲 TRUE 則 in_array() 函數還會檢查 needle 的類型是否和 haystack 中的相同。
相關文章
相關標籤/搜索