(PECL mysqlnd-uh >= 1.0.0-alpha)
MysqlndUhConnection::killConnection — Demande au serveur de tuer un thread MySQL
$connection
   , int $pid
   )Demande au serveur de tuer un thread MySQL.
connectionLe gestionnaire de connexion Mysqlnd. Ne pas modifier !
pidL'identifiant du thread de connexion à tuer.
   Retourne TRUE en cas de succès.
   Sinon, retourne FALSE
  
Exemple #1 Exemple avec MysqlndUhConnection::kill()
<?php
class proxy extends MysqlndUhConnection {
 public function killConnection($res, $pid) {
  printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
  $ret = parent::killConnection($res, $pid);
  printf("%s retourne %s\n", __METHOD__, var_export($ret, true));
  return $ret;
 }
}
mysqlnd_uh_set_connection_proxy(new proxy());
$mysqli = new mysqli("localhost", "root", "", "test");
$mysqli->kill($mysqli->thread_id);
?>
L'exemple ci-dessus va afficher :
proxy::killConnection(array ( 0 => NULL, 1 => 27650, )) proxy::killConnection retourne true