source/Redis/Connection.php
public function evalSha($sha, array $arguments = array()) {
        try {
            if (empty($arguments)) {
                $result = $this->getRedis()->evalSha($sha);
            } else {
                $result = $this->getRedis()->evalSha($sha, $arguments, count($arguments));
            }

            $lastError = $this->getRedis()->getLastError();
            $this->getRedis()->clearLastError();
            if (is_null($lastError)) {
                return $result;
            }
            throw new ScriptExecutionException($lastError);
        } catch (RedisException $ex) {
            throw new ConnectException();
        }
    }
public function evalSha($sha, array $arguments = array()) {
        try {
            if (empty($arguments)) {
                $result = $this->getRedis()->evalSha($sha);
            } else {
                $result = $this->getRedis()->evalSha($sha, $arguments, count($arguments));
            }

            $lastError = $this->getRedis()->getLastError();
            $this->getRedis()->clearLastError();
            if (is_null($lastError)) {
                return $result;
            }
            throw new ScriptExecutionException($lastError);
        } catch (RedisException $ex) {
            throw new ConnectException();
        }
    }
public function evalSha ( $ sha , array $ arguments = array ( ) ) { try { if ( empty ( $ arguments ) ) { $ result = $ this -> getRedis ( ) -> evalSha ( $ sha ) ; } else { $ result = $ this -> getRedis ( ) -> evalSha ( $ sha , $ arguments , count ( $ arguments ) ) ; } $ lastError = $ this -> getRedis ( ) -> getLastError ( ) ; $ this -> getRedis ( ) -> clearLastError ( ) ; if ( is_null ( $ lastError ) ) { return $ result ; } throw new ScriptExecutionException ( $ lastError ) ; } catch ( RedisException $ ex ) { throw new ConnectException ( ) ; } }
Evaluate Lua code by hash
@param string $sha SHA1 string of Lua code
@param array $arguments array of Lua script arguments
@return mixed code execution result
@throws ConnectException exception on connection to redis instance
@throws ScriptExecutionException when script execution faled
Evaluate Lua code by hash