Skip to content

Latest commit

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

phpish/redis

Simple PHP client library for the Redis protocol.

Requirements

  • PHP 5.3+

Getting Started

Download via Composer

Create a composer.json file if you don't already have one in your projects root directory and require phpish/redis:

{
"require": {
"phpish/redis": "dev-master"
}
}

Install Composer:

$ curl -s http://getcomposer.org/installer | php

Run the install command:

$ php composer.phar install

This will download phpish/redis into the vendor/phpish/redis directory.

To learn more about Composer visit http://getcomposer.org/

Description

callable client( [string $host = '127.0.0.1' [, int $port = 6379]] )

The returned function accepts a Redis command as a string.

Usage

<?phprequire'vendor/phpish/redis/redis.php';
usephpish\redis;
$redis = redis\client();
var_dump($redis('SET foo "bar baz"')); // bool(true)var_dump($redis('GET foo')); // string(7) "bar baz"$redis('QUIT');
?>

TODO

Support for Pipelining and Clustering.

About

Simple Redis client in PHP

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages