public function normalizeAmps(string $qs_url_uri): string
    {
        if (!$qs_url_uri) {
            return $qs_url_uri; // Possible `0`.
        }
        if (($regex_amps = &$this->cacheKey(__FUNCTION__.'_regex_amps')) === null) {
            $regex_amps = implode('|', array_keys($this::HTML_AMPERSAND_ENTITIES));
        }
        return preg_replace('/(?:'.$regex_amps.')/uS', '&', $qs_url_uri);
    }
public function normalizeAmps(string $qs_url_uri): string
    {
        if (!$qs_url_uri) {
            return $qs_url_uri; // Possible `0`.
        }
        if (($regex_amps = &$this->cacheKey(__FUNCTION__.'_regex_amps')) === null) {
            $regex_amps = implode('|', array_keys($this::HTML_AMPERSAND_ENTITIES));
        }
        return preg_replace('/(?:'.$regex_amps.')/uS', '&', $qs_url_uri);
    }
public function normalizeAmps ( string $ qs_url_uri ) : string { if ( ! $ qs_url_uri ) { return $ qs_url_uri ; // Possible `0`. } if ( ( $ regex_amps = & $ this -> cacheKey ( __FUNCTION__ . '_regex_amps' ) ) === null ) { $ regex_amps = implode ( '|' , array_keys ( $ this :: HTML_AMPERSAND_ENTITIES ) ) ; } return preg_replace ( '/(?:' . $ regex_amps . ')/uS' , '&' , $ qs_url_uri ) ; }
Normalize ampersands.

@since 150424 Initial release.

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

@return string The `$qs_url_uri` w/ normalized ampersands.
Normalize ampersands .