Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 9, 2024 via composer

predis/predis v2.2.2

A flexible and feature-complete Redis client for PHP.
Package summary
Share
0
issues
1
license
1
MIT
Package created
2 Oct 2011
Version published
13 Sep 2023
Maintainers
2
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
predis/predis@v2.2.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of predis/predis 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does predis/predis do?

Predis/Predis is a flexible, feature-rich Redis client for PHP 7.2 and newer. It provides support for versions of Redis from 3.0 to 7.0, including support for clustering, master-slave replication setups, and Redis transactions. The client also includes an abstraction for Lua scripting and supports connections via TCP/IP or UNIX domain sockets.

How do you use predis/predis?

To use Predis/Predis, you'll first need to install it using Composer:

composer require predis/predis

After installation, you can load the library and create a client instance. By default, Predis assumes 127.0.0.1 and 6379 as the host and port:

require 'Predis/Autoloader.php';

Predis\Autoloader::register();

$client = new Predis\Client();
$client->set('foo', 'bar');
$value = $client->get('foo');

For connecting to a different host and port, provide connection parameters in either URI format or a named array:

$client = new Predis\Client([
    'scheme' => 'tcp',
    'host'   => '10.0.0.1',
    'port'   => 6379,
]);

Or:

$client = new Predis\Client('tcp://10.0.0.1:6379');

There are numerous features and usage scenarios based on your specific requirements, all of which are described comprehensively in the Predis documentation.

Where are the predis/predis docs?

The Predis/Predis documentation can be found on the GitHub project page: https://github.com/predis/predis. It includes detailed usage examples along with frequently asked questions. For a step-by-step guide, refer to the Main features and How to install and use Predis sections.