文字

TokyoTyrant::putShl

(PECL tokyo_tyrant >= 0.1.0)

TokyoTyrant::putShlConcatenates to a record

说明

public mixed TokyoTyrant::putShl ( string $key , string $value , int $width )

Concatenate to a record and shift to left.

参数

key

A string key

value

The value to concatenate

width

The width of the record

返回值

This method returns a reference to the current object and throws TokyoTyrantException on failure.

范例

Example #1 TokyoTyrant::putShl() example

<?php

$tt  = new  TokyoTyrant ( "localhost" );


$tt -> put ( "key" "just a long piece of data" );


$tt -> putShl ( "key" " and string" 15 );


echo  $tt -> get ( "key" );
?>

以上例程会输出:

data and string

参见

  • TokyoTyrant::put() - Puts values
  • TokyoTyrant::putKeep() - Puts a record
  • TokyoTyrant::putCat() - Concatenates to a record
上一篇: 下一篇: