MysqlndUhConnection::getServerInformation

(PECL mysqlnd-uh >= 1.0.0-alpha)

MysqlndUhConnection::getServerInformationRetourne la version du serveur MySQL

Description

public string MysqlndUhConnection::getServerInformation ( mysqlnd_connection $connection )

Retourne la version du serveur MySQL.

Liste de paramètres

connection

Le gestionnaire de connexion Mysqlnd. Ne pas modifier !

Valeurs de retour

La version du serveur.

Exemples

Exemple #1 Exemple avec MysqlndUhConnection::getServerInformation()

  1. <?php
  2. class proxy extends MysqlndUhConnection {
  3. public function getServerInformation($res) {
  4. printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
  5. $ret = parent::getServerInformation($res);
  6. printf("%s retourne %s\n", __METHOD__, var_export($ret, true));
  7. return $ret;
  8. }
  9. }
  10. mysqlnd_uh_set_connection_proxy(new proxy());
  11.  
  12. $mysqli = new mysqli("localhost", "root", "", "test");
  13. var_dump($mysqli->server_info);
  14. ?>

L'exemple ci-dessus va afficher :

proxy::getServerInformation(array (
  0 => NULL,
))
proxy::getServerInformation retourne '5.1.45-debug-log'
string(16) "5.1.45-debug-log"

Voir aussi

LoadingChargement en cours