public function withoutLabel(int $key, int ...$keys): self
    {
        array_unshift($keys, $key);
        $nb_labels = count($this->labels);
        foreach ($keys as &$key) {
            if (- $nb_labels > $key || $nb_labels - 1 < $key) {
                throw new OffsetOutOfBounds(sprintf('no label can be removed with the submitted key : `%s`', $key));
            }

            if (0 > $key) {
                $key += $nb_labels;
            }
        }
        unset($key);

        $deleted_keys = array_keys(array_count_values($keys));
        $filter = static function ($key) use ($deleted_keys): bool {
            return !in_array($key, $deleted_keys, true);
        };

        return self::createFromLabels(array_filter($this->labels, $filter, ARRAY_FILTER_USE_KEY));
    }
public function withoutLabel(int $key, int ...$keys): self
    {
        array_unshift($keys, $key);
        $nb_labels = count($this->labels);
        foreach ($keys as &$key) {
            if (- $nb_labels > $key || $nb_labels - 1 < $key) {
                throw new OffsetOutOfBounds(sprintf('no label can be removed with the submitted key : `%s`', $key));
            }

            if (0 > $key) {
                $key += $nb_labels;
            }
        }
        unset($key);

        $deleted_keys = array_keys(array_count_values($keys));
        $filter = static function ($key) use ($deleted_keys): bool {
            return !in_array($key, $deleted_keys, true);
        };

        return self::createFromLabels(array_filter($this->labels, $filter, ARRAY_FILTER_USE_KEY));
    }
public function withoutLabel ( int $ key , int ... $ keys ) : self { array_unshift ( $ keys , $ key ) ; $ nb_labels = count ( $ this -> labels ) ; foreach ( $ keys as & $ key ) { if ( - $ nb_labels > $ key || $ nb_labels - 1 < $ key ) { throw new OffsetOutOfBounds ( sprintf ( 'no label can be removed with the submitted key : `%s`' , $ key ) ) ; } if ( 0 > $ key ) { $ key += $ nb_labels ; } } unset ( $ key ) ; $ deleted_keys = array_keys ( array_count_values ( $ keys ) ) ; $ filter = static function ( $ key ) use ( $ deleted_keys ) : bool { return ! in_array ( $ key , $ deleted_keys , true ) ; } ; return self :: createFromLabels ( array_filter ( $ this -> labels , $ filter , ARRAY_FILTER_USE_KEY ) ) ; }
Returns an instance without the specified label.

This method MUST retain the state of the current instance, and return
an instance that contains the modified component

If $key is non-negative, the removed label will be the label at $key position from the start.
If $key is negative, the removed label will be the label at $key position from the end.

@param int ...$keys

@throws OffsetOutOfBounds If the key is invalid
Returns an instance without the specified label .