1--TEST-- 2getServerList 3--SKIPIF-- 4<?php include "skipif.inc";?> 5--FILE-- 6<?php 7$servers = array ( 0 => array ( 'KEYHERE' => 'localhost', 11211, 3 ), ); 8$m = new memcached(); 9var_dump($m->getServerList()); 10$m->addServers($servers); 11var_dump($m->getServerList()); 12$m->addServers($servers); 13var_dump($m->getServerList()); 14$m = new memcached(); 15$m->addServer('127.0.0.1', 11211); 16var_dump($m->getServerList()); 17 18echo "OK"; 19?> 20--EXPECT-- 21array(0) { 22} 23array(1) { 24 [0]=> 25 array(3) { 26 ["host"]=> 27 string(9) "localhost" 28 ["port"]=> 29 int(11211) 30 ["type"]=> 31 string(3) "TCP" 32 } 33} 34array(2) { 35 [0]=> 36 array(3) { 37 ["host"]=> 38 string(9) "localhost" 39 ["port"]=> 40 int(11211) 41 ["type"]=> 42 string(3) "TCP" 43 } 44 [1]=> 45 array(3) { 46 ["host"]=> 47 string(9) "localhost" 48 ["port"]=> 49 int(11211) 50 ["type"]=> 51 string(3) "TCP" 52 } 53} 54array(1) { 55 [0]=> 56 array(3) { 57 ["host"]=> 58 string(9) "127.0.0.1" 59 ["port"]=> 60 int(11211) 61 ["type"]=> 62 string(3) "TCP" 63 } 64} 65OK