public static function serializeIPv6($address)
    {
        $output = inet_ntop(call_user_func_array('pack', array_merge(['n*'], $address)));
        return strpos($output, '.') !== false
            ? '::ffff:' . strtolower(dechex($address[6]) . ':' . dechex($address[7]))
            : $output;
    }