ZF-3577: simple optimizing toString functions

Description

escape the output string after the string was generated if no tags are included in the string

e.g: Zend_View_Helper_HeadTitle


    public function toString($indent = null)
    {
        $indent = (null !== $indent)
                ? $this->getWhitespace($indent)
                : $this->getIndent();

        $items = array();
        foreach ($this as $item) {
            $items[] = $this->_escape($item);
        }

        $separator = $this->_escape($this->getSeparator());

        return $indent . '' . implode($separator, $items) . '';
    }

the escape function need only one call


    public function toString($indent = null)
    {
        $indent = (null !== $indent)
                ? $this->getWhitespace($indent)
                : $this->getIndent();

        $items = array();
        foreach ($this as $item) {
            $items[] = $item;  // rem escpae
        }

        $separator = $this->getSeparator();  // rem escape

        return $indent . '' . $this->escape( implode($separator, $items) ) . '';  // add escape
    }

Comments

Fixed in r12174.

Changing issues in preparation for the 1.7.0 release.