略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: TokyoTyrant::putShl

2024-04-27

TokyoTyrant::putShl

(PECL tokyo_tyrant >= 0.1.0)

TokyoTyrant::putShlConcatenates to a record

说明

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

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
/* 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");
?>

以上例程会输出:

data and string

参见

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/tokyotyrant.putshl.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3