Couchbase 2.2.0 incompatibility with php Memcached library

Just to demonstrate it really clearly, here is some code snippet.
Test code:

$mc = new Memcached(); $mc->addServers(array(array('127.0.0.1','11211')));

$mc->set(‘mytestkey’, 1);
error_log($mc->get(‘mytestkey’));
$res = $mc->increment(‘mytestkey’, 1);
error_log(‘inc result:’);
var_dump($res);
error_log($mc->get(‘mytestkey’));
$mc->decrement(‘mytestkey’);
error_log($mc->get(‘mytestkey’));

$res = $mc->increment(‘mytestkey’, 1, 1);
error_log(‘inc result:’);
var_dump($res);
error_log($mc->get(‘mytestkey’));
$mc->decrement(‘mytestkey’);
error_log($mc->get(‘mytestkey’));

Output:

1
inc result:
int(2)
2
1
inc result:
bool(false)
1
0