PHP code example of icewind / predis-php-redis
1. Go to this page and download the library: Download icewind/predis-php-redis library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
icewind / predis-php-redis example snippets
// connect using php-redis as normal
$redis = new \Redis();
$redis->connect('127.0.0.1', 6379);
// create a predis instance using the existing php-redis instance
$predis = \PredisPHPRedis\Wrapper::wrap($redis);
// use predis as normal
$predis->set('foo', 'bar');