w3resource

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

PHP Function Reference

Previous: client_info
Next: close



Follow us on Facebook and Twitter for latest update.

PHP: Tips of the Day

PHP: How to define an empty object in PHP?

$x = new stdClass();

stdClass is the default PHP object. stdClass has no properties, methods or parent. It does not support magic methods, and implements no interfaces.

When you cast a scalar or array as Object, you get an instance of stdClass. You can use stdClass whenever you need a generic object instance.

Ref : https://bit.ly/2Q96Wvm

 





We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook