Returns true if $array has a key in $keys

@param Array $array
@param Array $keys
@return Array
515020
public static function hasKey(Array $array, Array $keys)
    {
        foreach ($array as $key => $value) {
            if (in_array($key, $keys)) {
                return true;
            }
        }

        return false;
    }
309218
protected function exists(array $array, $key)
    {
        if (isset($array[$key])) {
            return true;
        }

        foreach (explode(".", $key) as $part) {
            if (!is_array($array) or !isset($array[$part])) {
                return false;
            }

            $array = $array[$part];
        }

        return true;
    }
928663
public static function has(array $object, $keys)
    {
        try {
            static::get($object, $keys);

            return true;
        } catch (\Exception $e) {
            return false;
        }
    }
715819
public static function removeKeysFromMultiArray(&$array, $keys)
    {
        foreach ($array as $key => &$value) {
            if (is_array($value)) {
                self::traverseArray($value, $keys);
            } else {
                if (in_array($key, $keys) || '' == $value) {
                    unset($array[$key]);
                }
            }
        }

        return $array;
    }
981360
public static function has($array, $keys): bool
    {
        if (null === $keys) {
            return false;
        }

        $keys = (array)$keys;

        if (!$array) {
            return false;
        }

        if ($keys === []) {
            return false;
        }

        foreach ($keys as $key) {
            $subKeyArray = $array;

            if (static::exists($array, $key)) {
                continue;
            }

            foreach (explode('.', $key) as $segment) {
                if (static::accessible($subKeyArray) && static::exists($subKeyArray, $segment)) {
                    $subKeyArray = $subKeyArray[$segment];
                } else {

                    return false;
                }
            }
        }

        return true;
    }
326821
public static function getSubArrayFromArrayByKeys(array $array, array $keys)
    {
        $result = [];

        foreach ($keys as $key) {
            if (array_key_exists($key, $array)) {
                $result[$key] = $array[$key];
            }
        }

        return $result;
    }
1163195
protected static function array_key_exists( $key, $array, $useIsset = false )
    {
        if ( !is_array( $key ) )
        {
            $key = array($key);
        }

        foreach ( $key as $_key )
        {
            if ( ( $useIsset && isset( $array[$_key] ) ) || array_key_exists( $_key, $array ) )
            {
                return $_key;
            }
        }

        return false;
    }
1116179
public static function has(array $array, ...$keys): bool
    {
        $key = array_shift($keys);

        if (!isset($array[$key])) {
            return false;
        }

        if (empty($keys)) {
            return isset($array[$key]);
        }

        if (!\is_array($array[$key])) {
            return false;
        }

        return self::has($array[$key], ...$keys);
    }
667587
public static function has(array $array, $keyPath)
    {
        self::checkKeyPathIsValidAndNonEmpty($keyPath);
        $keys = self::explodeKeys(strval($keyPath));

        while ($keys !== array()) {
            $key = array_shift($keys);

            if (!array_key_exists($key, $array)) {
                return false;
            }
            $array = $array[$key];
            if (!is_array($array)) {
                break;
            }
        }

        return $keys === array();
    }
157698
public static function filterKeys ($array, $keys)
		{
			if (is_array($array))
			{
				$return = [];
				if (!is_array($keys))
					$keys = [ $keys ];
				foreach ($keys as $key)
					if (isset($array[ $key ]))
						$return[ $key ] = $array[ $key ];

				return $return;
			}

			return null;
		}
1252040
public static function isList(array $array): bool
	{
		$count = count($array);

		$range = $count
			? range(0, $count - 1)
			: [];

		$keys = array_keys($array);

		return $keys === $range;
	}
692821
public static function arrayKeysExists(array $keys, array $data)
    {
        return count(array_intersect_key(array_flip($keys), $data)) === count($keys);
    }
205488
public static function isPrimaryKey($keys)
    {
        if (!is_array($keys)) {
            $keys = [$keys];
        }
        $pks = static::getPrimaryKeyName(true);
        if (count($keys) === count($pks)) {
            return count(array_intersect($keys, $pks)) === count($pks);
        }

        return false;
    }
1147210
public static function array_keys_exists(Array $keys, Array $object): bool
    {
        foreach ($keys as $key) {
            if (!array_key_exists($key, $object))
                return false;
        }
        return true;
    }
1182294
public static function exists($array, $key)
    {
        $key = static::normalizeKey($key);

        if ($key === null || $key === '' || static::isEmpty($array))
        {
            return false;
        }

        $keys = explode('.', $key);
        $currentElement = $array;

        foreach ($keys as $currentKey)
        {
            if (!is_array($currentElement) || !array_key_exists($currentKey, $currentElement))
            {
                return false;
            }

            $currentElement = $currentElement[(string) $currentKey];
        }

        return true;
    }
942172
public static function isIndexedArray($array)
    {
        if (! is_array($array)) {
            return false;
        }

        foreach ($array as $key => $value) {
            if (! is_numeric($key)) {
                return false;
            }
        }

        return true;
    }
58444
public function keysExist(array $keys)
    {
        foreach ($keys as $key) {
            if (!$this->keyExists($key)) {
                return false;
            }
        }
        return true;
    }