public function withFragment(?string $fragment = null): UrlInterface
    {
        if (!self::myValidateFragment($fragment, $error)) {
            throw new UrlInvalidArgumentException($error);
        }

        return new self($this->myScheme, $this->myHost, $this->myPort, $this->myPath, $this->myQueryString, $fragment);
    }