<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="mysqli.get-proto-info" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>mysqli::$protocol_version</refname>
  <refname>mysqli_get_proto_info</refname>
  <refpurpose>Returns the version of the MySQL protocol used</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <para>&style.oop;</para>
  <fieldsynopsis><type>int</type><varname linkend="mysqli.get-proto-info">mysqli-&gt;protocol_version</varname></fieldsynopsis>
  <para>&style.procedural;</para>
  <methodsynopsis>
   <type>int</type><methodname>mysqli_get_proto_info</methodname>
   <methodparam><type>mysqli</type><parameter>mysql</parameter></methodparam>
  </methodsynopsis>
  <para>
   Returns an integer representing the MySQL protocol version used by the
   connection represented by the <parameter>mysql</parameter> parameter.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    &mysqli.link.description;
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns an integer representing the protocol version.
  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <example>
   <title><varname>$mysqli-&gt;protocol_version</varname> example</title>
   <para>&style.oop;</para>
   <programlisting role="php">
<![CDATA[
<?php

mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$mysqli = new mysqli("localhost", "my_user", "my_password");

/* print protocol version */
printf("Protocol version: %d\n", $mysqli->protocol_version);
]]>
   </programlisting>
   <para>&style.procedural;</para>
   <programlisting role="php">
<![CDATA[
<?php

mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$link = mysqli_connect("localhost", "my_user", "my_password");

/* print protocol version */
printf("Protocol version: %d\n", mysqli_get_proto_info($link));
]]>
   </programlisting>
   &examples.outputs;
   <screen>
<![CDATA[
Protocol version: 10
]]>
   </screen>
  </example>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>mysqli_get_host_info</function></member>
   </simplelist>
  </para>
 </refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
