PHPackages                             clue/redis-protocol - 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. clue/redis-protocol

ActiveLibrary[Caching](/categories/caching)

clue/redis-protocol
===================

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

v0.3.2(1y ago)5211.0M—4.5%9[2 issues](https://github.com/clue/redis-protocol/issues)13MITPHPPHP &gt;=5.3CI passing

Since Sep 9Pushed 1y ago6 watchersCompare

[ Source](https://github.com/clue/redis-protocol)[ Packagist](https://packagist.org/packages/clue/redis-protocol)[ Docs](https://github.com/clue/redis-protocol)[ Fund](https://clue.engineering/support)[ GitHub Sponsors](https://github.com/clue)[ RSS](/packages/clue-redis-protocol/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (7)Used By (13)

clue/redis-protocol
===================

[](#clueredis-protocol)

[![CI status](https://github.com/clue/redis-protocol/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/redis-protocol/actions)[![code coverage](https://camo.githubusercontent.com/2d45ae33b28ed0c5f14fdba645e579072cf437770a215524795c9eb258581b1c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6465253230636f7665726167652d3130302532352d73756363657373)](#tests)[![installs on Packagist](https://camo.githubusercontent.com/859e1069f3c7cd25fe3ebc65c48bc9b0a086a76e120c0b6e5074a3b45c99da07/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c75652f72656469732d70726f746f636f6c3f636f6c6f723d626c7565266c6162656c3d696e7374616c6c732532306f6e2532305061636b6167697374)](https://packagist.org/packages/clue/redis-protocol)

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

This parser and serializer implementation allows you to parse Redis protocol messages into native PHP values and vice-versa. This is usually needed by a Redis client implementation which also handles the connection socket.

To re-iterate: This is *not* a Redis client implementation. This is a protocol implementation that is usually used by a Redis client implementation. If you're looking for an easy way to build your own client implementation, then this is for you. If you merely want to connect to a Redis server and issue some commands, you're probably better off using one of the existing client implementations.

**Table of contents**

- [Support us](#support-us)
- [Quickstart example](#quickstart-example)
- [Usage](#usage)
    - [Factory](#factory)
    - [Parser](#parser)
    - [Model](#model)
    - [Serializer](#serializer)
- [Install](#install)
- [Tests](#tests)
- [License](#license)

Support us
----------

[](#support-us)

We invest a lot of time developing, maintaining and updating our awesome open-source projects. You can help us sustain this high-quality of our work by [becoming a sponsor on GitHub](https://github.com/sponsors/clue). Sponsors get numerous benefits in return, see our [sponsoring page](https://github.com/sponsors/clue)for details.

Let's take these projects to the next level together! 🚀

Quickstart example
------------------

[](#quickstart-example)

```
