original_string: public static function escape($mixed, $quote_style = ENT_QUOTES, $charset = 'UTF-8')
      {
  
          if (is_string($mixed)) {
              $mixed = htmlspecialchars($mixed, $quote_style, $charset);
          } elseif (is_object($mixed) || is_array($mixed)) {
              foreach ($mixed as $k => &$v) {
                  if ($v) {
                      if (is_object($mixed)) {
                          $mixed->$k = self::escape($v, $quote_style, $charset);
                      } else {
                          $mixed[$k] = self::escape($v, $quote_style, $charset);
                      }
                  }
              }
          }
  
          return $mixed;
      }
code: public static function escape($mixed, $quote_style = ENT_QUOTES, $charset = 'UTF-8')
      {
  
          if (is_string($mixed)) {
              $mixed = htmlspecialchars($mixed, $quote_style, $charset);
          } elseif (is_object($mixed) || is_array($mixed)) {
              foreach ($mixed as $k => &$v) {
                  if ($v) {
                      if (is_object($mixed)) {
                          $mixed->$k = self::escape($v, $quote_style, $charset);
                      } else {
                          $mixed[$k] = self::escape($v, $quote_style, $charset);
                      }
                  }
              }
          }
  
          return $mixed;
      }
code_tokens: public static function escape ( $ mixed , $ quote_style = ENT_QUOTES , $ charset = 'UTF-8' ) { if ( is_string ( $ mixed ) ) { $ mixed = htmlspecialchars ( $ mixed , $ quote_style , $ charset ) ; } elseif ( is_object ( $ mixed ) || is_array ( $ mixed ) ) { foreach ( $ mixed as $ k => & $ v ) { if ( $ v ) { if ( is_object ( $ mixed ) ) { $ mixed -> $ k = self :: escape ( $ v , $ quote_style , $ charset ) ; } else { $ mixed [ $ k ] = self :: escape ( $ v , $ quote_style , $ charset ) ; } } } } return $ mixed ; }
docstring: Recursively htmlspecialchars string properties of objects and arrays
  @param mixed $mixed The object or array to convert
  @param int $quote_style ent quote style from htmlspecialchars
  @param string $charset The charset from  htmlspecialchars
  @return type
docstring_tokens: Recursively htmlspecialchars string properties of objects and arrays