Ask how to use hiredis under swoole

The asynchronous redis client in the

swoole document reads as follows:

< H1 > swoole_redis- > _ _ call < / H1 >

Magic method, the method name is mapped to the Redis instruction, and the parameter is used as the parameter of the Redis instruction.

$redis->hmset("test", "a 1 b 2", function (\Swoole\Redis $redis, bool $result) {
    if ($result === false) {
        var_dump($redis->errMsg);
    }
})

ask the Great God for guidance

Apr.02,2021

Hmset key field value

$redis->hmset('test', 'tfiled', 'a 1 b 2', function (\Swoole\Redis $redis, bool $result) {
    if ($result === false) {
        var_dump($redis->errMsg);
    }
})
Menu