MysqlndUhConnection::restartPSession
(PECL mysqlnd-uh >= 1.0.0-alpha)
MysqlndUhConnection::restartPSession — Redémarre une connexion mysqlnd persistante
Description
   public bool MysqlndUhConnection::restartPSession
    ( mysqlnd_connection 
  $connection
   )Redémarre une connexion mysqlnd persistante.
Liste de paramètres
- 
    connection
- 
     Gestionnaire de connexion Mysqlnd. Ne pas modifier ! 
Valeurs de retour
   Retourne TRUE en cas de succès.
   Sinon, retourne FALSE
  
Exemples
Exemple #1 Exemple avec MysqlndUhConnection::restartPSession()
<?php
class proxy extends MysqlndUhConnection {
 public function ping($res) {
  printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
  $ret = parent::ping($res);
  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->ping();
?>L'exemple ci-dessus va afficher :
proxy::restartPSession(array ( 0 => NULL, )) proxy::restartPSession retourne true
