K2hash::setTransactionThreadPool K2hash Class K2hash::transaction

K2hash::setValue

Sets the value associated with the key

Description

 public bool K2hash::setValue ( string $key , string $value [, string $subkey [, string $pass [, int $expire ]]] )

Sets the value associated with the key.

Parameters

Return Values

Returns true on success or false on failure.

Examples

<?php
$k2hash = new K2hash();
$k2hash->openMem();
$k2hash->setValue("key1", "value1");
var_dump($k2hash->getValue("key1"));
$k2hash->close();
?>

The above example will output:

string(6) "value1"

See Also

K2hash::setTransactionThreadPool K2hash Class K2hash::transaction