public function htmlEncode($string, $quoteStyle = ENT_QUOTES, $charset = 'UTF-8', $doubleEncode = false)
    {
        return htmlspecialchars((string) $string, $quoteStyle, $charset, $doubleEncode);
    }
public function htmlEncode($string, $quoteStyle = ENT_QUOTES, $charset = 'UTF-8', $doubleEncode = false)
    {
        return htmlspecialchars((string) $string, $quoteStyle, $charset, $doubleEncode);
    }
public function htmlEncode ( $ string , $ quoteStyle = ENT_QUOTES , $ charset = 'UTF-8' , $ doubleEncode = false ) { return htmlspecialchars ( ( string ) $ string , $ quoteStyle , $ charset , $ doubleEncode ) ; }
Replacement for htmlspecialchars

@param string $string
@param int $quoteStyle default ENT_QUOTES
@param string $charset default UTF-8
@param bool $doubleEncode - when double_encode is turned off PHP will not encode existing html entities
@return string
Replacement for htmlspecialchars