src/includes/classes/Core/Utils/UrlQuery.php
protected function string(string $qs_url_uri): string
    {
        if (!$qs_url_uri) {
            return $qs_url_uri; // Possible `0`.
        }
        $qs_url_uri = $this->c::normalizeUrlAmps($qs_url_uri);

        if (mb_strpos($qs_url_uri, '?') !== false) {
            list(, $qs) = explode('?', $qs_url_uri, 2);
        } elseif ($qs_url_uri[0] === '/' || preg_match('/^'.$this::URL_REGEX_FRAG_SCHEME.'/u', $qs_url_uri)) {
            $qs = ''; // There is no query string in this case.
        } else {
            $qs = $qs_url_uri; // Assume it's a query string.
        }
        return $qs = $this->c::mbTrim($qs, '', '?=&');
    }
protected function string(string $qs_url_uri): string
    {
        if (!$qs_url_uri) {
            return $qs_url_uri; // Possible `0`.
        }
        $qs_url_uri = $this->c::normalizeUrlAmps($qs_url_uri);

        if (mb_strpos($qs_url_uri, '?') !== false) {
            list(, $qs) = explode('?', $qs_url_uri, 2);
        } elseif ($qs_url_uri[0] === '/' || preg_match('/^'.$this::URL_REGEX_FRAG_SCHEME.'/u', $qs_url_uri)) {
            $qs = ''; // There is no query string in this case.
        } else {
            $qs = $qs_url_uri; // Assume it's a query string.
        }
        return $qs = $this->c::mbTrim($qs, '', '?=&');
    }
Acquire/sanitize query string.

@since 150424 Improving query strings.

@param string $qs_url_uri A query string (w/ or w/o a leading `?`), a URL, or URI.

@return string Query string (no leading `?`); w/ normalized ampersands.