K2hdkc::casDecrement K2hdkc Class K2hdkc::casIncrement

K2hdkc::casGet

Gets a value using CAS operation

Description

    public function casGet(
        string $key,
        string $password = null): int|false {}

Gets a value using CAS operation.

Parameters

Return Values

Returns the value on success, otherwise 0(false).

Examples

php -r '
$handle = new K2hdkc("./tests/slave.ini");
$handle->casInit("key", 0);
$handle->casSet("key", 0, 1);
var_dump($handle->casGet("key"));
$handle->close();
'

The above example will output:

int(1)

See Also

K2hdkc::casDecrement K2hdkc Class K2hdkc::casIncrement