Check if an item or items exist in an array using "dot" notation.

@param array    $array
@param string[] ...$keys

@return bool
340718
public static function has(array $array, string ...$keys): bool
    {
        if ($array === [] || $keys === []) {
            return false;
        }

        foreach ($keys as $key) {
            if (isset($array[$key])) {
                continue;
            }

            $subKeyArray = $array;
            foreach (\explode('.', $key) as $segment) {
                if (\is_array($subKeyArray) && isset($subKeyArray[$segment])) {
                    $subKeyArray = $subKeyArray[$segment];
                } else {
                    return false;
                }
            }
        }

        return true;
    }
458057
public static function keyExists(array $array, $path) : bool
    {
        foreach (explode('.', $path) as $segment) {
            if (! is_array($array) or ! array_key_exists($segment, $array)) {
                return false;
            }

            $array = $array[$segment];
        }

        return true;
    }
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;
    }
861547
public static function findKey($aKey, $array) {
        // Check if an array is provided.
        if (is_array($array)) {
            // Loops through the array.
            foreach ($array as $key => $item) {
                // Checks if it did find the matching key. If it doesn't, it continues looping until it does,
                // or until the end of the array.
                if ($key == $aKey) {
                    return $item;
                } else {
                    $result = self::findKey($aKey, $item);
                    if ($result != false) {
                        return $result;
                    }
                }
            }
        }
        return false;
    }
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();
    }
477406
public static function has($array, $keys = null, $opr = null)
    {
        $keys = (array) $keys;

        if (count($keys) === 0) {
            return false;
        }

        foreach ($keys as $key) {
            $get = self::get($array, $key, null, $opr);
            if (self::isReallyArray($get) || $get === null) {
                return false;
            }
        }

        return true;
    }
1368227
public function hasAny($keys)
    {
        $keys = is_array($keys) ? $keys : func_get_args();

        $input = $this->all();

        foreach ($keys as $key) {
            if (Arr::has($input, $key)) {
                return true;
            }
        }

        return false;
    }
58099
private function hasPath(array $keys, array &$source)
    {
        $key = array_shift($keys);

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

        if (!$keys) {
            return true;
        } else {
            $value = & $source[$key];

            if ($value instanceof IConfig) {
                return $value->has(implode(self::PATH_SEPARATOR, $keys));
            } elseif (is_array($value)) {
                return $this->hasPath($keys, $value);
            } else {
                return false;
            }
        }
    }
70786
public static function isAssoc(array $array): bool
    {
        if (empty($array)) {
            return false;
        }

        foreach (array_keys($array) as $key) {
            if (\is_string($key)) {
                return true;
            }
        }

        return false;
    }
1294663
public static function filterKeys(array $array, array $keys): array
	{
		$keysKeys = array_flip($keys);
		$presentKeysKeys = array_intersect_key($keysKeys, $array);
		$presentKeys = array_flip($presentKeysKeys);

		$filtered = [];
		foreach ($presentKeys as $key) {
			$filtered[$key] = $array[$key];
		}

		return $filtered;
	}
910850
public final function deleteItems(array $keys)
   {
       try {
           foreach ($keys as $value) {
               if (!$this->deleteItem($value)) {
                   return false;
               }
           }
       } catch (InvalidArgumentException $e) {
           throw $e;
       }
       return true;
   }
454314
protected function isPureArray(array $array ) {
            $i=0;
            foreach($array as $k=>$v) {
                if ( $k !== $i ) {
                   return false;
                }
                $i++;
            }

            return true;
        }
1104252
public static function has($array, $keys)
	{
		if(is_null($keys) || !$array)
			return false;

		$keys = static::toArray($keys);

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

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

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

			foreach (static::toKey($key) as $segment) {
				if (static::accessible($subKeyArray) && static::exists($subKeyArray, $segment))
					$subKeyArray = $subKeyArray[$segment];
				else
					return false;
			}
		}

		return true;
	}
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);
    }
1000141
public function hasMany(array $keys)
    {
        foreach ($keys as $key) {
            if (!$this->has($key)) {
                return false;
            }
        }

        return true;
    }
1172623
public static function drop(array &$array, $key)
    {
        $keys = explode('.', $key);
        $last = array_pop($keys);
        foreach($keys as $key) {
            if(!isset($array[$key])) {
                return false;
            }
            $array = &$array[$key];
        }

        if(isset($array[$last])) {
            unset($array[$last]);
            return true;
        }

        return false;
    }
54889
final public static function anyKeysExist(array $array, array $keys) : bool
    {
        foreach ($keys as $key) {
            if (array_key_exists($key, $array)) {
                return true;
            }
        }

        return false;
    }