--TEST-- Test libmemcached encryption --SKIPIF-- = 0x01000018) die ("skip test for libmemcached lower than 1.0.18"); ?> --FILE-- setEncodingKey("Hello")); var_dump ($m->set ($key, 'set using encoding')); var_dump ($m->get ($key)); echo "OK" . PHP_EOL; # libmemcached < 1.0.18 goes into a bad state when the encoding key is changed, # so php-memcached warns and returns false when trying to change the key. var_dump ($m->setEncodingKey("World")); echo "OK" . PHP_EOL; ?> --EXPECTF-- bool(true) bool(true) string(18) "set using encoding" OK Warning: Memcached::setEncodingKey(): libmemcached versions less than 1.0.18 cannot change encoding key in %s on line %d bool(false) OK