PHPackages                             jelix/php-redis - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. jelix/php-redis

ActiveLibrary[Caching](/categories/caching)

jelix/php-redis
===============

php classes to manage data into a redis database. Fork from Sash php-redis lib.

v2.0.1(8y ago)04.6k1LGPL-2.1PHPPHP &gt;=5.6

Since Jun 1Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jelix/php-redis)[ Packagist](https://packagist.org/packages/jelix/php-redis)[ RSS](/packages/jelix-php-redis/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (5)Used By (1)

PHP Redis
=========

[](#php-redis)

php-redis contains php classes for connecting with redis database with methods for all available commands in redis.

It provides pure PHP API, and doesn't rely on some PHP extensions.

Quick start
-----------

[](#quick-start)

- Install Redis Server from [redis.io](http://redis.io/download "Redis")
- Download latest php-redis class from [here](https://github.com/jelix/php-redis/archives/master)
- Write some code:

```
		# Connecting
		$r = new \PhpRedis\Redis('localhost', 6379);

		# Save some value
		$r->some_key = 'hello world';

		# Outputting it
		echo $r->some_key;

		# Call any redis method (including methods added in redis 2.*)
		echo $r->zcard('zkey');
```

Changelog
---------

[](#changelog)

- 1.0: Initial implementation with all functions implemented up to redis 1.0
- 1.1:
    - The unified request protocol is used (intruduced in redis 1.2).
    - Redis implements the \_\_call magic method. Any non-implemented redis method can be called via -&gt;methodname(param1, ...)
- 1.2: pipeline support. -&gt;pipeline\_begin() and then execute any number of commands - each will return null Then run -&gt;pipeline\_responses() to get all of the responses as array and end the pipeline mode
- 1.2.1: fix quit() error, undefined variable on connection errors, and add closing during destruction of the object
- 1.3.0:
    - support of Pub/Sub
    - new method flushByPrefix(). Read warning in the method comment.
    - new methods getHost() and getPort()
    - fix cloning support: a clone should not reuse the same socket.
- 2.0.0:
    - move classes into a namespace to avoid conflicts with classes of the redis extension.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 51.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~196 days

Total

4

Last Release

3050d ago

Major Versions

v1.3.0 → v2.0.02017-02-01

PHP version history (2 changes)v1.2.1PHP &gt;=5.3.3

v2.0.0PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae8142be36568660282368ce7c1eec904ecbc515ab5b58c759a487f3a6f1d114?d=identicon)[laurentj](/maintainers/laurentj)

![](https://www.gravatar.com/avatar/baa42c7323bbc9245b0c70f770031383879941a1a813f678f2835699fd50b375?d=identicon)[mdouchin](/maintainers/mdouchin)

---

Top Contributors

[![sash](https://avatars.githubusercontent.com/u/45210?v=4)](https://github.com/sash "sash (19 commits)")[![laurentj](https://avatars.githubusercontent.com/u/336034?v=4)](https://github.com/laurentj "laurentj (17 commits)")[![Cinamonas](https://avatars.githubusercontent.com/u/136233?v=4)](https://github.com/Cinamonas "Cinamonas (1 commits)")

---

Tags

redis

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jelix-php-redis/health.svg)

```
[![Health](https://phpackages.com/badges/jelix-php-redis/health.svg)](https://phpackages.com/packages/jelix-php-redis)
```

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[clue/redis-protocol

A streaming Redis protocol (RESP) parser and serializer written in pure PHP.

5211.0M13](/packages/clue-redis-protocol)[cache/redis-adapter

A PSR-6 cache implementation using Redis (PhpRedis). This implementation supports tags

523.9M27](/packages/cache-redis-adapter)[enqueue/redis

Message Queue Redis Transport

405.5M25](/packages/enqueue-redis)[kdyby/redis

Redis storage for Nette Framework

491.6M2](/packages/kdyby-redis)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
