IT. Expert System.

PHP

The get purpose


TokyoTyrant::get

(PECL tokyo_tyrant >= 0.1.0)

TokyoTyrant::getThe get purpose

Description

public mixed TokyoTyrant::get ( mixed $keys )

This method is used to return a value or multiple values. This method accepts a string or an array as a value.

Parameters

keys

A string key or an array of string keys

Return Values

Returns a string or an array based on the given parameters. Throws a TokyoTyrantException on error. If string is passed null is returned if the key is not found. In case an array is given as an parameter only existing keys will be returned. It is not an error to pass a key that does not exist.

Examples

Example #1 TokyoTyrant::get() example

<?php
$tt 
= new TokyoTyrant("localhost"1978);
$tt->put("key1""value1");
$tt->put("key2""value2");
var_dump($tt->get(array("key1""key2")));
var_dump($tt->get("key1"));
?>

The above example will output:

 array(2) { ["key1"]=> string(6) "value1" ["key2"]=> string(6) "value2" } string(6) "value1" 

See Also



Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 571 / 158681030. Delta: 0.05338 с