|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-02-06 14:19 UTC] andrei@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 13:00:02 2025 UTC |
Description: ------------ Error setMulti Reproduce code: --------------- <?PHP $mc = new Memcached(); $mc->addServer( '192.168.0.108', 11211); // This is 'localhost' $mc->addServer( '192.168.0.109', 11211); $mc->addServer( '192.168.0.110', 11211); $mc->flush(); $a = array('k1'=>'v1', 'k2'=>'v2', 'k3'=>'v3', 'k4'=>'v4', 'k5'=>'v5', 'k6'=>'v6', 'k7'=>'v7', 'k8'=>'v8', 'k9'=>'v9', 'k10'=>'v10', 'k11'=>'v11', 'k12'=>'v12'); $b = array( 0=>'k1', 1=>'k2', 2=>'k3', 3=>'k4', 4=> 'k5', 5=>'k6', 6=>'k7', 7=>'k8', 8=>'k9', 9=>'k10', 10=>'k11', 11=>'k12'); var_dump($mc->setMulti($a)); // result bool(true) var_dump($mc->getMulti($b)); // !!! Restore only keys 'k2' and 'k3' $mc->flush(); foreach($a as $k=>$val) { var_dump($mc->set($k, $val, 0)); } var_dump($mc->getMulti($b)); // All Ok! ?> Expected result: ---------------- array(12) { ["k10"]=> string(3) "v10" ["k11"]=> string(3) "v11" ["k12"]=> string(3) "v12" ["k1"]=> string(2) "v1" ["k2"]=> string(2) "v2" ["k3"]=> string(2) "v3" ["k4"]=> string(2) "v4" ["k5"]=> string(2) "v5" ["k6"]=> string(2) "v6" ["k7"]=> string(2) "v7" ["k8"]=> string(2) "v8" ["k9"]=> string(2) "v9" } Actual result: -------------- array(2) { ["k2"]=> string(2) "v2" ["k3"]=> string(2) "v3" }