original_string: protected function xmlToArray($xml)
      {
          // Do not output libxml error messages to screen
          $useErrors = libxml_use_internal_errors(true);
          $array = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA);
          libxml_use_internal_errors($useErrors);
  
          // Fix the issue that XML parse empty data to new SimpleXMLElement object
          return array_map('strval', (array) $array);
      }
code: protected function xmlToArray($xml)
      {
          // Do not output libxml error messages to screen
          $useErrors = libxml_use_internal_errors(true);
          $array = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA);
          libxml_use_internal_errors($useErrors);
  
          // Fix the issue that XML parse empty data to new SimpleXMLElement object
          return array_map('strval', (array) $array);
      }
code_tokens: protected function xmlToArray ( $ xml ) { // Do not output libxml error messages to screen $ useErrors = libxml_use_internal_errors ( true ) ; $ array = simplexml_load_string ( $ xml , 'SimpleXMLElement' , LIBXML_NOCDATA ) ; libxml_use_internal_errors ( $ useErrors ) ; // Fix the issue that XML parse empty data to new SimpleXMLElement object return array_map ( 'strval' , ( array ) $ array ) ; }
docstring: Convert XML string to array
  
  @param string $xml
  @return array
docstring_tokens: Convert XML string to array