mixed array_search ( mixed $needle , array $haystack [, bool $strict ] )
If the third parameter strict is set to TRUE then the array_search() function will also check the types of the needle in the haystack .
I don’t see what it means,maybe an example can help?
If the last argument is true, it will use strict (also known as identity) comparison (
===) when searching the array.The equality comparison (
==) compares the value where as the identity comparison (===) compares the value and the type.You will find more information in this question How do the equality (== double equals) and identity (=== triple equals) comparison operators differ?
This means that if you had an array of numbers
Using a strict comparison for the string value
'2'will return false (not find a match) as there are no strings with the value'2'.However if you don’t do a strict search, the string is implicitly converted into an integer (or the other way around) and it returns the index of
2, as2 == '2'