PHP code example of amphp / redis

1. Go to this page and download the library: Download amphp/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/ */

    

amphp / redis example snippets




unction Amp\Redis\createRedisClient;

$redis = createRedisClient('redis://');

$redis->set('foo', '21');
$result = $redis->increment('foo', 21);

\var_dump($result); // int(42)