Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
- $memcache = new Memcache();
- for($i=2;$i<=9;$i++) {
- $memcache->addServer("localhost",(int)"1121".$i); // instance n
- }
- $memcache->set("keyfalse",false);
- if ($value=$memcache->get("keyfalse")) echo "pas false > $value";
- echo"test keyfalse";
- var_dump($memcache->get("keyfalse"));
- if ($memcache->get("keyfalse") == false) echo "----double FALSE----";
- echo"fin test";
- echo"test inexistant";
- var_dump($memcache->get("key3"));
- if ($memcache->get("key3") == false) echo "----double FALSE----";
- echo"fin test";
- $memcache->set("key1","value1");
- $memcache->set("key2","value2");
- if ($value1 = $memcache->get("key1")) echo "pas false key1 > ".$value1;
- $aStats = $memcache->getExtendedStats();
- //var_dump($aStats);
- foreach($aStats as $iInstance=>$oInstance) {
- echo $iInstance." -> ".($oInstance ? " pid:".$oInstance["pid"]." ". " Number of items : ".$oInstance["cmd_set"] : "Discon$
- echo PHP_EOL;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement