public function htmlchars($php)
    {
        // PHP strings can be escaped at compile time
        if (preg_match('/^\'((?:[^\'{]+|\\\\.)*)\'$/s', $php, $m)) {
            return "'".htmlspecialchars(str_replace('\\\'', "'", $m[1]), ENT_QUOTES, $this->encoding)."'";
        }
        return 'phptal_escape('.$php.', \''.$this->encoding.'\')';
    }
public function htmlchars($php)
    {
        // PHP strings can be escaped at compile time
        if (preg_match('/^\'((?:[^\'{]+|\\\\.)*)\'$/s', $php, $m)) {
            return "'".htmlspecialchars(str_replace('\\\'', "'", $m[1]), ENT_QUOTES, $this->encoding)."'";
        }
        return 'phptal_escape('.$php.', \''.$this->encoding.'\')';
    }
public function htmlchars ( $ php ) { // PHP strings can be escaped at compile time if ( preg_match ( '/^\'((?:[^\'{]+|\\\\.)*)\'$/s' , $ php , $ m ) ) { return "'" . htmlspecialchars ( str_replace ( '\\\'' , "'" , $ m [ 1 ] ) , ENT_QUOTES , $ this -> encoding ) . "'" ; } return 'phptal_escape(' . $ php . ', \'' . $ this -> encoding . '\')' ; }
expects PHP code and returns PHP code that will generate escaped string
Optimizes case when PHP string is given.

@return php code
expects PHP code and returns PHP code that will generate escaped string Optimizes case when PHP string is given .