PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

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

Parameters

key

The key of which size to fetch

Return Values

Returns the size of the key or throw TokyoTyrantException on error

Examples

Example #1 TokyoTyrant::size example

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

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

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

The above example will output:

5

PHP Manual