w3resource

PHP mysqli: client_info() function

mysqli_get_client_info() function / mysqli::$client_info

The mysqli_get_client_info() function / mysqli::$client_info is used to get Client library version as a string.

Syntax:

Object oriented style

string $mysqli->client_info;

Procedural style

string mysqli_get_client_info ( mysqli $link )

Usage: Procedural style

mysqli_client_info;

Return value:

A string that represents the MySQL client library version

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: %s\n", mysqli_get_client_info());
?>

Output:

Client library version: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $

See also

PHP Function Reference

Previous: character_set_name
Next: client_version



Follow us on Facebook and Twitter for latest update.

PHP: Tips of the Day

To use the constant simply use its name:

Example:

if (EARTH_IS_FLAT) {
 print "Earth is flat";
}
print APP_ENV_UPPERCASE; 

Output:


or if you don't know the name of the constant in advance, use the constant function:

// this code is equivalent to the above code
$const1 = "EARTH_IS_FLAT";
$const2 = "APP_ENV_UPPERCASE";
if (constant($const1)) {
 print "Earth is flat";
}
print constant($const2);

Output:


 





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