Hello.
Again, I can not understand the results of the responses.
Situation number 1:
Ubuntu server 14.04
PHP 7.0.7-2+donate.sury.org~trusty+1 (cli) ( NTS )
Apache2
Couchbase cli 2.2.0beta3
i’m do:
$document = ["aaa" => "bbb", "ccc" => "ddd"];
$docName = "0001Test";
$bucketArticle = $welcome->autoConnectToBucket(["bucket" => "article"]);
try {
$bucketArticle->insert($docName, $document);
} catch (Exception $e) {
echo "Not . " . $e->getMessage();
}
Then:
$bucketArticle = $welcome->autoConnectToBucket(["bucket" => "article"]);
try {
$res = $bucketArticle->get("0001Test");
echo "\n\r<br>---> <b>res: </b><br>";
var_dump($res);
} catch (Exception $e) {
echo "Not found. " . $e->getMessage();
}
Result:
---> res:
object(CouchbaseMetaDoc)#7 (4) {
["error"]=>
NULL
["value"]=>
string(25) "{"aaa":"bbb","ccc":"ddd"}"
["flags"]=>
int(0)
["cas"]=>
string(10) "23e6g3zkt0"
}
Situation number 2:
Ubuntu server 14.04
PHP 5.5.9-1ubuntu4.17 (cli) (built: May 19 2016 19:05:57)
Apache2
Couchbase cli 2.0.7
i’m do:
$document = ["aaa" => "bbb", "ccc" => "ddd"];
$docName = "0002Test";
$bucketArticle = $welcome->autoConnectToBucket(["bucket" => "article"]);
try {
$bucketArticle->insert($docName, $document);
} catch (Exception $e) {
echo "Not . " . $e->getMessage();
}
Then:
$bucketArticle = $welcome->autoConnectToBucket(["bucket" => "article"]);
try {
$res = $bucketArticle->get("0002Test");
echo "\n\r<br>---> <b>res: </b><br>";
var_dump($res);
} catch (Exception $e) {
echo "Not found. " . $e->getMessage();version
}
Result:
---> res:
object(CouchbaseMetaDoc)#10 (4) {
["error"]=>
NULL
["value"]=>
object(stdClass)#7 (2) {
["aaa"]=>
string(3) "bbb"
["ccc"]=>
string(3) "ddd"
}
["flags"]=>
int(33554438)
["cas"]=>
string(10) "27wg6eyolw"
}
In both cases, I get different results:
-
Situation number 1: value - string
-
Situation number 2: value - object(stdClass)
Why when I changed the version of the client has changed the type of data?
Thank you.