PHP code example of since / redis

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

    

since / redis example snippets


  //要先 use since\Redis;
        $redis=Redis::getInstance();
        $keys=$redis->keys("*");
        var_dump($keys);
        $a=$redis->info('server');
        var_dump($a);
        $a=$redis->set('test',123);
        var_dump($a);
        $a=$redis->get('test');