src/Redis.php
public function set($key, $value, $ttl = null): bool
    {
        $ttl    = $this->getTtl($ttl);
        $params = ($ttl <= 0) ? [$key, $value] : [$key, $value, $ttl];

        return $this->call('set', $params);
    }
public function set($key, $value, $ttl = null): bool
    {
        $ttl    = $this->getTtl($ttl);
        $params = ($ttl <= 0) ? [$key, $value] : [$key, $value, $ttl];

        return $this->call('set', $params);
    }
Set the string value in argument as value of the key.

@param string $key
@param mixed  $value
@param int    $ttl unit is seconds

@return bool