mysqli::$client_info
(mysqli_get_client_info) Get MySQL client information
The function mysqli::$client_info() is used to obtain the version information of the current MySQL client library.
usage:
$mysqli = new mysqli("localhost", "username", "password", "database"); if ($mysqli->connect_errno) { die("连接失败:" . $mysqli->connect_error); } $clientInfo = $mysqli->client_info; // 获取客户端库的版本信息echo "MySQL 客户端库版本:" . $clientInfo; $mysqli->close(); // 关闭连接
Example: Assuming the version of the MySQL client library is 8.0.19, the above code will output:
MySQL 客户端库版本:mysqlnd 8.0.19
Please note that the mysqli::$client_info property is available in PHP 5.3.0 and above.