public function output($buffer) {
        if (!$buffer && !$this->__result) {
            return '';
        }

        $out = '';
        // Always include the output generated by the expression first
        if ($buffer) {
            $out .= Garp_Cli::lineOut($buffer, null, true, false);
        }

        // And follow-up with the populated result, if any
        if ($this->__result) {
            // Try to format as user-friendly as possible
            $isObjWithToArray = is_object($this->__result) &&
                method_exists($this->__result, 'toArray');
            $this->__result = $isObjWithToArray ? $this->__result->toArray() : $this->__result;
            $this->__result = var_export($this->__result, true);
            $out .= Garp_Cli::lineOut($this->__result, Garp_Cli::BLUE, true, false);
        }

        return $out;
    }