Remove one or many array items from a given array using "dot" notation.

@param  array  $array
@param  array|string  $keys
@return void
962591
public static function forget(&$array, $keys) {
        $original = &$array;

        $keys = (array) $keys;

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

        foreach ($keys as $key) {
            // if the exact key exists in the top-level, remove it
            if (array_key_exists($key, $array)) {
                unset($array[$key]);
                continue;
            }

            $parts = explode('.', $key);

            // clean up before each pass
            $array = &$original;

            while (count($parts) > 1) {
                $part = array_shift($parts);

                if (isset($array[$part]) && is_array($array[$part])) {
                    $array = &$array[$part];
                } else {
                    continue 2;
                }
            }

            unset($array[array_shift($parts)]);
        }
    }
189178
public static function delete(&$array, $key)
    {
        if (is_null($key)) {
            return false;
        }
        if (is_array($key)) {
            $return = [];
            foreach ($key as $k) {
                $return[$k] = static::delete($array, $k);
            }
            return $return;
        }

        $keyParts = explode('.', $key);

        if (!is_array($array) or !array_key_exists($keyParts[0], $array)) {
            return false;
        }

        $thisKey = array_shift($keyParts);

        if (!empty($keyParts)) {
            $key = implode('.', $keyParts);
            return static::delete($array[$thisKey], $key);
        } else {
            unset($array[$thisKey]);
        }
        return true;
    }
216478
private function validateKeys(array $keys)
    {
        foreach ($keys as $key) {
            $key = (string)$key;
            $this->validateKey($key);
        }
    }
1241702
private function cloneArray(array &$array): void
    {
        foreach ($array as $key => $value) {
            if (is_object($value)) {
                $array[$key] = clone $value;
            }
            if (is_array($value)) {
                $this->cloneArray($array[$key]);
            }
        }
    }
298090
public function forget($keys)
    {
        $remove  = $keys;

        foreach($remove as $key){
            $this->unsetValue($key);
        }

    }
1054139
protected function normalize(array &$array)
    {
        foreach ($array as $key => $value) {
            if (array_key_exists($key, self::$apcFix)) {
                unset($array[$key]);
                $array[self::$apcFix[$key]] = $value;
            }
        }
    }
1262787
public function unsetItems($keys = null)
    {
        if (is_null($keys)) {
            $this->_items = [];
        } elseif (is_scalar($keys)) {
            unset($this->_items[$keys]);
        } else {
            foreach ($keys as $k) {
                unset($this->_items[$k]);
            }
        }
    }
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);
    }
381874
public static function deleteKeys(array &$array, array $unwantedKey)
    {
        self::unsetKeys($array, $unwantedKey);

        foreach ($array as &$value) {
            if (\is_array($value)) {
                self::deleteKeys($value, $unwantedKey);
            }
        }
    }
1048223
static private function filterKeys( array &$keys )
    {
        if ( isset( $GLOBALS['eZRequestError'] ) && $GLOBALS['eZRequestError'] === true )
        {
            $requestUri = eZSys::requestURI();
            foreach ( $keys as $i => &$key )
            {
                if ( is_array( $key ) )
                {
                    self::filterKeys( $key );
                }
                else if ( $key === $requestUri )
                {
                    unset( $keys[$i] );
                }
            }
        }
    }
564323
protected function isArrayHasKeys($array = [], $keys = []) {
		foreach ($keys as $key) {
			if (!ArrayHelper::getValue($array, $key, false)) {
				return false;
			}
		}

		return true;
	}
1071468
public static function reduce(array $set, array $keys) {
        $array = array();

        foreach ($set as $key => $value) {
            if (in_array($key, $keys)) {
                $array[$key] = $value;
            }
        }

        return $array;
    }
62523
protected static function deleteMultiple(array &$arr, array $keys)
    {
        $return = [];
        foreach ($keys as $key) {
            $return[$key] = static::delete($arr, $key);
        }

        return $return;
    }
810716
public function deleteMultiple($keys)
    {
        $this->throwInvalidArrayArgumentException($keys);

        foreach($keys as $key) {
            $this->delete($key);
        }

        return true;
    }
1265581
public function remove($keys)
    {
        $keys = (array) $keys; // Cast all the things
        $this->keys = array_filter($this->keys(), function ($key) use ($keys) {
            foreach ($keys as $remove) {
                if (preg_match('/^'.preg_quote($remove, '/').'(\..+)?$/', $key)) {
                    // Keys and descendant keys will be removed
                    return false;
                }
            }

            return true;
        });
    }
709962
public static function remove(array $array, array $path) {
		while (count($path)) { // Only try this while a valid path is given
			$key = array_shift($path); // Get the current key
			if(array_key_exists($key, $array)) { // If the current key is present in the current recursion-level...
				if(count($path)) { // After involving array_shift, the path could now be empty. If not...
					if(is_array($array[$key])) { // If it is an array we need to step into the next recursion-level...
						$array[$key] = self::remove($array[$key], $path);
					}
					// If it is not an array, the sub-path can't be reached - stop.
				} else { // We finally arrived at the targeted node. Remove...
					unset($array[$key]);
				}
				break;
			} else { // If not, the path is not fully present in the array - stop.
				break;
			}
		}
		return $array;
	}
711239
public function unsetFilter($array, $keys) {
		if(is_array($array)) {
			if(!is_array($keys)) {
				$keys = array(
					$keys 
				);
			}
			foreach($keys as $key) {
				if(array_key_exists($key, $array)) {
					unset($array[$key]);
				}
			}
		}
		return $array;
	}