Home

predis

Predis is a Redis client library for PHP, written entirely in PHP. It provides a high-level, object-oriented interface to Redis and does not require the PHP Redis extension to be installed. By using Composer, Predis can connect to single Redis instances, Sentinel-managed setups, or Redis Cluster deployments.

Key features include support for pipelines, transactions (MULTI/EXEC), Lua scripting (EVAL), publish/subscribe, and read-write splitting for

Predis is distributed as the predis/predis package and integrates with PHP’s autoloading. It runs on PHP versions

The Predis design emphasizes portability and ease of use, with a modular structure that separates connection

replication.
It
supports
authentication
and
various
connection
options,
including
DSN
or
parameter
arrays.
The
library
offers
a
flexible
command
wrapper
that
enables
issuing
Redis
commands
through
PHP
methods
and
can
be
extended
with
custom
commands.
compatible
with
the
library,
historically
from
PHP
5.3
onward,
with
modern
releases
requiring
PHP
7
or
higher.
Because
it
is
pure
PHP,
it
can
be
easier
to
deploy
in
shared
hosting
or
environments
where
compiling
native
extensions
is
not
possible,
though
its
performance
is
generally
lower
than
that
of
the
native
phpredis
extension.
handling,
command
execution,
and
client
behavior.
It
has
been
widely
adopted
in
PHP
ecosystems
as
a
practical
Redis
client
alternative
when
a
pure-PHP
solution
is
desired.