MySQLi
PHP Manual

mysqli_get_client_version

mysqli::$client_version

(PHP 5, PHP 7)

mysqli_get_client_version -- mysqli::$client_versionReturns the MySQL client version as an integer

说明

面向对象风格

过程化风格

int mysqli_get_client_version ( mysqli $link )

Returns client version number as an integer.

返回值

A number that represents the MySQL client library version in format: main_version*10000 + minor_version *100 + sub_version. For example, 4.1.0 is returned as 40100.

This is useful to quickly determine the version of the client library to know if some capability exits.

范例

Example #1 mysqli_get_client_version

<?php

/* We don't need a connection to determine
   the version of mysql client library */

printf("Client library version: %d\n"mysqli_get_client_version());
?>

参见


MySQLi
PHP Manual