library/Rediska/Connection/Exec.php
public function read()
    {
        if (!$this->isWritten()) {
            throw new Rediska_Connection_Exec_Exception('You must write command before read');
        }

        $this->_isWritten = false;

        if ($this->getResponseIterator() !== null) {
            if ($this->getResponseIterator() === true) {
                $className = 'Rediska_Connection_Exec_MultiBulkIterator';
            } else {
                $className = $this->getResponseIterator();
            }

            $response = new $className($this->getConnection(), $this->getResponseCallback());
        } else {
            $response = self::readResponseFromConnection($this->getConnection());

            if ($this->_responseCallback !== null) {
                $response = call_user_func($this->getResponseCallback(), $response);
            }
        }

        return $response;
    }
public function read()
    {
        if (!$this->isWritten()) {
            throw new Rediska_Connection_Exec_Exception('You must write command before read');
        }

        $this->_isWritten = false;

        if ($this->getResponseIterator() !== null) {
            if ($this->getResponseIterator() === true) {
                $className = 'Rediska_Connection_Exec_MultiBulkIterator';
            } else {
                $className = $this->getResponseIterator();
            }

            $response = new $className($this->getConnection(), $this->getResponseCallback());
        } else {
            $response = self::readResponseFromConnection($this->getConnection());

            if ($this->_responseCallback !== null) {
                $response = call_user_func($this->getResponseCallback(), $response);
            }
        }

        return $response;
    }
Read response from connection

@return array|string