src/Connection_Dumper.php
public function execute(Expression $expr)
    {
        $this->start_time = microtime(true);

        try {
            $ret = parent::execute($expr);
            $took = microtime(true) - $this->start_time;

            if ($this->callback && is_callable($this->callback)) {
                call_user_func($this->callback, $expr, $took, false);
            } else {
                printf("[%02.6f] %s\n", $took, $expr->getDebugQuery());
            }
        } catch (\Exception $e) {
            $took = microtime(true) - $this->start_time;

            if ($this->callback && is_callable($this->callback)) {
                call_user_func($this->callback, $expr, $took, true);
            } else {
                printf("[ERROR %02.6f] %s\n", $took, $expr->getDebugQuery());
            }

            throw $e;
        }

        return $ret;
    }
public function execute(Expression $expr)
    {
        $this->start_time = microtime(true);

        try {
            $ret = parent::execute($expr);
            $took = microtime(true) - $this->start_time;

            if ($this->callback && is_callable($this->callback)) {
                call_user_func($this->callback, $expr, $took, false);
            } else {
                printf("[%02.6f] %s\n", $took, $expr->getDebugQuery());
            }
        } catch (\Exception $e) {
            $took = microtime(true) - $this->start_time;

            if ($this->callback && is_callable($this->callback)) {
                call_user_func($this->callback, $expr, $took, true);
            } else {
                printf("[ERROR %02.6f] %s\n", $took, $expr->getDebugQuery());
            }

            throw $e;
        }

        return $ret;
    }
Execute expression.

@param Expression $expr

@return \PDOStatement