<commit_before># Predis #

[![Latest Stable Version](https://poser.pugx.org/predis/predis/v/stable.png)](https://packagist.org/packages/predis/predis)
[![Total Downloads](https://poser.pugx.org/predis/predis/downloads.png)](https://packagist.org/packages/predis/predis)

Predis is a flexible and feature-complete PHP (>= 5.3) client library for [Redis](http://redis.io).

Predis does not require any additional extension loaded in PHP but can be optionally paired with the
[phpiredis](https://github.com/nrk/phpiredis) C-based extension to lower the overhead of serializing
and parsing the Redis protocol. An asynchronous implementation of the client, albeit experimental,
is also available through [Predis\Async](https://github.com/nrk/predis-async).

The library can also be used with [HHVM](http://www.hhvm.com) >= 2.3.0 although we cannot guarantee
that you will not run into unexpected issues especially in some obscure corner cases, mostly due to
the fact that HHVM is still being actively developed and not 100% compatible with PHP.

You can refer to our [FAQ](FAQ.md) for a list of frequently asked questions about Predis, or find
more details on the [wiki pages](https://github.com/nrk/predis/wiki) of the project.


## Main features ##

- Wide range of Redis versions supported (from __1.2__ to __2.8__ and unstable) using profiles.
- Clustering via client-side sharding using consistent hashing or custom distributors.
- Smart support for [redis-cluster](http://redis.io/topics/cluster-spec) (Redis >= 3.0).
- Support for master-slave replication configurations (write on master, read from slaves).
- Transparent key prefixing for all Redis commands using a customizable prefixing strategy.
- Command pipelining (works on both single and aggregate connections).
- Abstraction for Redis transactions (Redis >= 2.0) supporting CAS operations (Redis >= 2.2).
- Abstraction for Lua scripting (Redis >= 2.6) with automatic switching between `EVALSHA` or `EVAL`.
- Abstraction for `SCAN`, `SSCAN`, `ZSCAN` and `HSCAN` (Redis >= 2.8) based on PHP iterators.
- Connections to Redis are established lazily by the client upon the first command.
- Support for both TCP/IP and UNIX domain sockets and persistent connections.
- Support for [Webdis](http://webd.is) (both `ext-curl` and `ext-phpiredis` are needed).
- Support for custom connection classes for providing different network or protocol backends.
- Flexible system for defining and registering custom sets of supported commands or profiles.


## How to use Predis ##

Predis is available on [Packagist](http://packagist.org/packages/predis/predis) which allows a quick
installation using [Composer](http://packagist.org/about-composer). Alternatively, the library can
be found on our [own PEAR channel](http://pear.nrk.io) for a more traditional installation via PEAR.<commit_msg>Update README.<commit_after># Predis #

[![Latest Stable Version](https://poser.pugx.org/predis/predis/v/stable.png)](https://packagist.org/packages/predis/predis)
[![Total Downloads](https://poser.pugx.org/predis/predis/downloads.png)](https://packagist.org/packages/predis/predis)

Predis is a flexible and feature-complete [Redis](http://redis.io) client library for PHP >= 5.3 and
[HHVM](http://www.hhvm.com) >= 2.3.0.

Predis does not require any additional extension loaded in PHP but can be optionally paired with the
[phpiredis](https://github.com/nrk/phpiredis) C-based extension to lower the overhead of serializing
and parsing the Redis protocol. An asynchronous implementation of the client, albeit experimental,
is also available through [Predis\Async](https://github.com/nrk/predis-async).

While it can be used with HHVM, there are no guarantees that you will not run into unexpected issues
especially in some obscure corner cases due to the fact that HHVM is still under heavy development
and not yet 100% compatible with PHP.

More details about Predis can be found in our [frequently asked questions](FAQ.md) section or on the
[wiki](https://github.com/nrk/predis/wiki) of the project.


## Main features ##

- Wide range of Redis versions supported (from __1.2__ to __2.8__ and unstable) using profiles.
- Clustering via client-side sharding using consistent hashing or custom distributors.
- Smart support for [redis-cluster](http://redis.io/topics/cluster-spec) (Redis >= 3.0).
- Support for master-slave replication configurations (write on master, read from slaves).
- Transparent key prefixing for all Redis commands using a customizable prefixing strategy.
- Command pipelining (works on both single and aggregate connections).
- Abstraction for Redis transactions (Redis >= 2.0) supporting CAS operations (Redis >= 2.2).
- Abstraction for Lua scripting (Redis >= 2.6) with automatic switching between `EVALSHA` or `EVAL`.
- Abstraction for `SCAN`, `SSCAN`, `ZSCAN` and `HSCAN` (Redis >= 2.8) based on PHP iterators.
- Connections to Redis are established lazily by the client upon the first command.
- Support for both TCP/IP and UNIX domain sockets and persistent connections.
- Support for [Webdis](http://webd.is) (both `ext-curl` and `ext-phpiredis` are needed).
- Support for custom connection classes for providing different network or protocol backends.
- Flexible system for defining and registering custom sets of supported commands or profiles.


## How to use Predis ##

Predis is available on [Packagist](http://packagist.org/packages/predis/predis) which allows a quick
installation using [Composer](http://packagist.org/about-composer). Alternatively, the library can
be found on our [own PEAR channel](http://pear.nrk.io) for a more traditional installation via PEAR.
{'fraction_non_alphanumeric': 0.09879603399433427, 'fraction_numerical': 0.007790368271954674, 'mean_word_length': 4.717611336032388, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 14, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1386952', 'n_tokens_mistral': 1646, 'n_tokens_neox': 1582, 'n_words': 650}