original_string: public function xml_escape($string) {
          if (!empty($string) && htmlspecialchars($string) != $string) {
              // If the string contains something that looks like the end
              // of a CDATA section, then we need to avoid errors by splitting
              // the string between two CDATA sections.
              $string = str_replace(']]>', ']]]]><![CDATA[>', $string);
              return "<![CDATA[{$string}]]>";
          } else {
              return $string;
          }
      }
code: public function xml_escape($string) {
          if (!empty($string) && htmlspecialchars($string) != $string) {
              // If the string contains something that looks like the end
              // of a CDATA section, then we need to avoid errors by splitting
              // the string between two CDATA sections.
              $string = str_replace(']]>', ']]]]><![CDATA[>', $string);
              return "<![CDATA[{$string}]]>";
          } else {
              return $string;
          }
      }
code_tokens: public function xml_escape ( $ string ) { if ( ! empty ( $ string ) && htmlspecialchars ( $ string ) != $ string ) { // If the string contains something that looks like the end // of a CDATA section, then we need to avoid errors by splitting // the string between two CDATA sections. $ string = str_replace ( ']]>' , ']]]]><![CDATA[>' , $ string ) ; return "<![CDATA[{$string}]]>" ; } else { return $ string ; } }
docstring: Take a string, and wrap it in a CDATA secion, if that is required to make
  the output XML valid.
  @param string $string a string
  @return string the string, wrapped in CDATA if necessary.
docstring_tokens: Take a string and wrap it in a CDATA secion if that is required to make the output XML valid .