(PECL tokyo_tyrant >= 0.1.0)
TokyoTyrant::putShl — Concatenates to a record
Concatenate to a record and shift to left.
A string key
The value to concatenate
The width of the record
This method returns a reference to the current object and throws TokyoTyrantException on failure.
Beispiel #1 TokyoTyrant::putShl() example
<?php
/* Connect to a database on default port */
$tt = new TokyoTyrant("localhost");
/* Create a new key */
$tt->put("key", "just a long piece of data");
/* Concatenate and shift to left */
$tt->putShl("key", " and string", 15);
/* Echo the key */
echo $tt->get("key");
?>
Das oben gezeigte Beispiel erzeugt folgende Ausgabe:
data and string