TokyoTyrant
PHP Manual

TokyoTyrant::size

(PECL tokyo_tyrant >= 0.1.0)

TokyoTyrant::sizeReturns the size of the value

Description

public int TokyoTyrant::size ( string $key )

Returns the size of a value by key

Liste de paramètres

key

The key of which size to fetch

Valeurs de retour

Returns the size of the key or throw TokyoTyrantException on error

Exemples

Exemple #1 TokyoTyrant::size() example

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

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

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

L'exemple ci-dessus va afficher :

5


TokyoTyrant
PHP Manual