intersect()
The intersect() method computes the intersection with other arrays and returns the values that intersects with another array.
<?php use kim\present\utils\arrays\ArrayUtils;
$arrayUtils = ArrayUtils::from(["first", "second", "third"]);
//General array comparison
$arrayUtils->intersect(["first", "third"]);
// expected output: ["first", "third"]Syntax
$arrayUtils->intersect(iterable ...$iterables) : ArrayUtils;Parameter
Return value
Prefixing
References
Last updated