src/Traits/Arrays.php
public static function intersects(array $a, array $b): bool
    {
        $a = (array)$a;
        $b = (array)$b;

        return count(self::intersection($a, $b)) > 0;
    }
public static function intersects(array $a, array $b): bool
    {
        $a = (array)$a;
        $b = (array)$b;

        return count(self::intersection($a, $b)) > 0;
    }
public static function intersects ( array $ a , array $ b ) : bool { $ a = ( array ) $ a ; $ b = ( array ) $ b ; return count ( self :: intersection ( $ a , $ b ) ) > 0 ; }
Return a boolean flag which indicates whether the two input arrays have any common elements.

@usage __::intersects(["green", "red", "blue"], ["green", "yellow", "red"])
>> true

@param array $a
@param array $b

@return bool
Return a boolean flag which indicates whether the two input arrays have any common elements .