mirror of
https://github.com/php-win-ext/php-memcached.git
synced 2026-04-24 09:18:10 +02:00
d142a68dfe
Also flush server every time so that we start from a clean slate
31 lines
666 B
PHP
31 lines
666 B
PHP
--TEST--
|
|
Memcached::append()
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("memcached")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
include dirname (__FILE__) . '/config.inc';
|
|
$m = memc_get_instance ();
|
|
|
|
error_reporting(0);
|
|
$m->delete('foo');
|
|
$m->setOption(Memcached::OPT_COMPRESSION, true);
|
|
var_dump($m->append('foo', 'a'));
|
|
echo $php_errormsg, "\n";
|
|
|
|
$m->setOption(Memcached::OPT_COMPRESSION, false);
|
|
$m->delete('foo');
|
|
var_dump($m->append('foo', 'a'));
|
|
var_dump($m->get('foo'));
|
|
$m->set('foo', 'a');
|
|
var_dump($m->append('foo', 'b'));
|
|
var_dump($m->get('foo'));
|
|
|
|
--EXPECTF--
|
|
NULL
|
|
%s: cannot append/prepend with compression turned on
|
|
bool(false)
|
|
bool(false)
|
|
bool(true)
|
|
string(2) "ab"
|