public static function removeSegments($uri, int $key, int ... $keys)
    {
        $uri = self::filterUri($uri);

        return self::normalizePath($uri, (new HierarchicalPath($uri->getPath()))->withoutSegment($key, ...$keys));
    }
public static function removeSegments($uri, int $key, int ... $keys)
    {
        $uri = self::filterUri($uri);

        return self::normalizePath($uri, (new HierarchicalPath($uri->getPath()))->withoutSegment($key, ...$keys));
    }
public static function removeSegments ( $ uri , int $ key , int ... $ keys ) { $ uri = self :: filterUri ( $ uri ) ; return self :: normalizePath ( $ uri , ( new HierarchicalPath ( $ uri -> getPath ( ) ) ) -> withoutSegment ( $ key , ... $ keys ) ) ; }
Remove path segments from the URI path according to their offsets.

@param int... $keys

@return Psr7UriInterface|UriInterface
Remove path segments from the URI path according to their offsets .