TokyoTyrant
PHP Manual

TokyoTyrant::size

(PECL tokyo_tyrant >= Unknown)

TokyoTyrant::sizeReturns the size of the value

Описание

public int TokyoTyrant::size ( string $key )

Returns the size of a value by key

Параметри

key

The key of which size to fetch

Връщани стойности

Returns the size of the key or throw TokyoTyrantException on error

Примери

Example #1 TokyoTyrant::size example

<?php
$tt 
= new TokyoTyrant("localhost");

$tt->put("test_key""12345");

echo 
$tt->size("test_key");
?>

Примерът по-горе ще изведе:

5


TokyoTyrant
PHP Manual