Memcached::fetch

(PECL memcached >= 0.1.0)

Memcached::fetch抓取锟斤拷一锟斤拷锟斤拷锟�

说锟斤拷

public Memcached::fetch ( void ) : array

Memcached::fetch()锟斤拷锟斤拷锟揭伙拷锟斤拷锟斤拷锟斤拷锟阶ト★拷锟揭伙拷锟斤拷锟斤拷锟斤拷

锟斤拷锟斤拷

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

锟斤拷锟斤拷值

锟斤拷锟斤拷锟斤拷一锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟铰凤拷锟斤拷FALSE锟斤拷 锟斤拷锟斤拷锟斤拷锟斤拷锟窖撅拷抓取锟斤拷希锟�Memcached::getResultCode()锟斤拷锟斤拷锟斤拷Memcached::RES_END锟斤拷

锟斤拷锟斤拷

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

<?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);
//循锟斤拷抓取锟斤拷锟斤拷锟斤拷映锟阶ト★拷玫锟斤拷慕锟斤拷
while ($result $m->fetch()) {
    
var_dump($result);
}
?>

锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�

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

锟轿硷拷