library/Rediska/Command/PopFromList.php
public function create($key, $pushToKey = null)
    {
        $connection = $this->_rediska->getConnectionByKeyName($key);

        if (is_null($pushToKey)) {
            $command = array('RPOP',
                             $this->_rediska->getOption('namespace') . $key);
        } else {
            $toConnection = $this->_rediska->getConnectionByKeyName($pushToKey);

            if ($connection->getAlias() == $toConnection->getAlias()) {
                $this->_throwExceptionIfNotSupported('1.1');

                $command = array('RPOPLPUSH',
                                 $this->_rediska->getOption('namespace') . $key,
                                 $this->_rediska->getOption('namespace') . $pushToKey);
            } else {
                $this->setAtomic(false);

                $command = array('RPOP',
                                 $this->_rediska->getOption('namespace') . $key);
            }
        }

        return new Rediska_Connection_Exec($connection, $command);
    }
public function create($key, $pushToKey = null)
    {
        $connection = $this->_rediska->getConnectionByKeyName($key);

        if (is_null($pushToKey)) {
            $command = array('RPOP',
                             $this->_rediska->getOption('namespace') . $key);
        } else {
            $toConnection = $this->_rediska->getConnectionByKeyName($pushToKey);

            if ($connection->getAlias() == $toConnection->getAlias()) {
                $this->_throwExceptionIfNotSupported('1.1');

                $command = array('RPOPLPUSH',
                                 $this->_rediska->getOption('namespace') . $key,
                                 $this->_rediska->getOption('namespace') . $pushToKey);
            } else {
                $this->setAtomic(false);

                $command = array('RPOP',
                                 $this->_rediska->getOption('namespace') . $key);
            }
        }

        return new Rediska_Connection_Exec($connection, $command);
    }
Create command

@param string           $name       Key name
@param string[optional] $pushToName If not null - push value to another key.
@return Rediska_Connection_Exec