Zend\Stdlib\ArrayUtils::inArray
Checks if a value exists in an array.
Due to "foo" == 0 === TRUE with in_array when strict = false, an option has been added to prevent this. When $strict = 0/false, the most secure non-strict check is implemented. if $strict = -1, the default in_array non-strict behaviour is used.
Signature
public function inArray(mixed
$needle,
[array
$haystack = false,
[int|bool
$strict = false]] )
Parameters
$needle
— mixed$haystack
— array$strict
— object
Returns
- bool