(PECL memcached >= 0.1.0)
Memcached::getServerList — 锟斤拷取锟斤拷锟斤拷锟斤拷锟斤拷锟叫的凤拷锟斤拷锟斤拷锟叫憋拷
Memcached::getServerList()锟斤拷锟截凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟叫凤拷锟斤拷锟斤拷锟叫憋拷.
锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷
锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟叫凤拷锟斤拷锟斤拷锟叫憋拷.
Example #1 Memcached::getServerList() 示锟斤拷
<?php
$m = new Memcached();
$m->addServers(array(
array('mem1.domain.com', 11211, 20),
array('mem2.domain.com', 11311, 80),
));
var_dump($m->getServerList());
?>
锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�
array(2) { [0]=> array(3) { ["host"]=> string(15) "mem1.domain.com" ["port"]=> int(11211) ["weight"]=> int(20) } [1]=> array(3) { ["host"]=> string(15) "mem2.domain.com" ["port"]=> int(11311) ["weight"]=> int(80) } }