isSubset() public static method (available since version 2.0.7)
Checks whether an array or Traversable is a subset of another array or Traversable.
This method will return true
, if all elements of $needles
are contained in $haystack
. If at least one element is missing, false
will be returned.
public static boolean isSubset ( $needles, $haystack, $strict = false ) | ||
---|---|---|
$needles | array|Traversable |
The values that must all be in |
$haystack | array|Traversable |
The set of value to search. |
$strict | boolean |
Whether to enable strict ( |
return | boolean |
|
throws | yii\base\InvalidParamException |
if |
Please login to continue.