PHP mysqli: client_version() function
mysqli_get_client_version() function / mysqli::$client_version
The mysqli_get_client_version() function / mysqli::$client_version is used to get Client library version as an integer.
Syntax:
Object oriented style
int $mysqli->client_version;
Procedural style
int mysqli_get_client_version ( mysqli $link )
Usage: Procedural style
mysqli_client_version;
Return value:
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 exists.
Version: PHP 5, PHP 7
Example
<?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());
?>
Sample Output:
Client library version: 50005
See also
Previous: client_info
Next: close
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/php/function-reference/mysqli_client_version.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics