Memcached::fetchAll

(PECL memcached >= 0.1.0)

Memcached::fetchAll抓取锟斤拷锟斤拷剩锟斤拷慕锟斤拷

说锟斤拷

public Memcached::fetchAll ( void ) : array

Memcached::fetchAll()抓取锟斤拷锟揭伙拷锟斤拷锟斤拷锟侥斤拷锟斤拷锟斤拷锟绞o拷锟斤拷锟斤拷锟叫斤拷锟斤拷锟斤拷锟揭拷锟斤拷锟斤拷fetchAll锟斤拷fetch锟侥凤拷锟截诧拷同锟斤拷 锟斤拷为fetchAll抓取锟斤拷锟角斤拷锟斤拷锟斤拷锟绞o拷锟斤拷锟斤拷锟皆拷兀锟� 锟斤拷锟皆憋拷fetch锟侥斤拷锟斤拷锟揭伙拷锟轿拷取锟�

锟斤拷锟斤拷

锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷

锟斤拷锟斤拷值

锟斤拷锟截斤拷锟斤拷锟� 锟斤拷锟斤拷锟斤拷失锟斤拷时锟斤拷锟斤拷 FALSE. 锟斤拷锟斤拷要锟斤拷使锟斤拷 Memcached::getResultCode()锟斤拷

锟斤拷锟斤拷

Example #1 Memcached::getDelayed() 示锟斤拷

<?php
$m 
= new Memcached();
$m->addServer('localhost'11211);

$m->set('int'99);
$m->set('string''a simple string');
$m->set('array', array(1112));

//锟接筹拷抓取int锟斤拷array锟斤拷锟斤拷key锟斤拷值
$m->getDelayed(array('int''array'), true);
//抓取锟斤拷锟斤拷delay抓取锟斤拷锟斤拷锟叫斤拷锟�
var_dump($m->fetchAll());
?>

锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�

array(2) {
  [0]=>
  array(3) {
    ["key"]=>
    string(3) "int"
    ["value"]=>
    int(99)
    ["cas"]=>
    float(2363)
  }
  [1]=>
  array(3) {
    ["key"]=>
    string(5) "array"
    ["value"]=>
    array(2) {
      [0]=>
      int(11)
      [1]=>
      int(12)
    }
    ["cas"]=>
    float(2365)
  }
}

锟轿硷拷