Revision 346661393431 () - Diff

Link to this snippet: https://friendpaste.com/MJS2O8G5b7kRqslp2pMBo
Embed:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
// Setup Couchbase connected objects
try {
$cb = new Couchbase("127.0.0.1:8091");
} catch (ErrorException $e) {
die($e->getMessage());
}

$basic = array('a' => 'chicken', 'b' => 'cow');
print_r($basic);
print_r(var_dump(array_key_exists('a', $basic)));

/**** outputs....
Array
(
[a] => chicken
[b] => cow
)
bool(true)
****/

$cb->set('a', 'chicken');
$cb->set('b', 'cow');

$test = $cb->getMulti(array('a', 'b'));
print_r($test);
print_r(var_dump(array_key_exists('a', $test)));

/**** outputs....
Array
(
[a] => chicken
[b] => cow
)
bool(false)
****/