public static function serializeHost($host)
    {
        if (is_int($host) || is_float($host)) {
            $string = self::serializeIPv4($host);
        } elseif (is_array($host)) {
            $string = '[' . self::serializeIPv6($host) . ']';
        } else {
            $string = (string)$host;
        }
        return $string;
    }
public static function serializeHost($host)
    {
        if (is_int($host) || is_float($host)) {
            $string = self::serializeIPv4($host);
        } elseif (is_array($host)) {
            $string = '[' . self::serializeIPv6($host) . ']';
        } else {
            $string = (string)$host;
        }
        return $string;
    }
public static function serializeHost ( $ host ) { if ( is_int ( $ host ) || is_float ( $ host ) ) { $ string = self :: serializeIPv4 ( $ host ) ; } elseif ( is_array ( $ host ) ) { $ string = '[' . self :: serializeIPv6 ( $ host ) . ']' ; } else { $ string = ( string ) $ host ; } return $ string ; }
The host serializer.
@link https://url.spec.whatwg.org/#concept-host-serializer URL Standard
@param string|int|float|int[] $host
A domain, IPv4 address (an integer or float) or IPv6 address (an array of a 16-bit unsigned integer).
@return string
The host serializer .