PHP 8.5.0 Alpha 1 available for testing

Memcache::close

memcache_close

(PECL memcache >= 0.4.0)

Memcache::close -- memcache_closeCierra la conexión con el servidor Memcache

Descripción

Memcache::close(): bool
memcache_close(Memcache $memcache): bool

Memcache::close() cierra la conexión al servidor Memcache. Esta función no cierra las conexiones persistentes que serán cerradas únicamente durante el reinicio del servidor web.

Parámetros

Esta función no tiene parámetros.

Valores devueltos

Devuelve true en caso de éxito o false en caso de error.

Ejemplos

Ejemplo #1 Ejemplo con Memcache::close()

<?php

/* API procedimental */
$memcache_obj = memcache_connect('memcache_host', 11211);
/*
haga algo aquí ...
*/
memcache_close($memcache_obj);

/* API orientada a objetos */
$memcache_obj = new Memcache;
$memcache_obj->connect('memcache_host', 11211);
/*
haga algo aquí ...
*/
$memcache_obj->close();

?>

Ver también

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top