original_string: public function prepareResponse($result)
      {
          $response = ['header' => null, 'content' => null];
          $d = "\r\n\r\n"; // Headers and content delimiter
  
          if (is_string($result) && strpos($result, $d) !== false) {
              list($header, $content) = explode($d, $result, 2);
              if (stripos($header, '100 Continue') !== false && strpos($content, $d) !== false) {
                  list($header, $content) = explode($d, $content, 2);
              }
              $response['header'] = $header;
              $response['content'] = htmlentities($content);
          }
  
          return $response;
      }
code: public function prepareResponse($result)
      {
          $response = ['header' => null, 'content' => null];
          $d = "\r\n\r\n"; // Headers and content delimiter
  
          if (is_string($result) && strpos($result, $d) !== false) {
              list($header, $content) = explode($d, $result, 2);
              if (stripos($header, '100 Continue') !== false && strpos($content, $d) !== false) {
                  list($header, $content) = explode($d, $content, 2);
              }
              $response['header'] = $header;
              $response['content'] = htmlentities($content);
          }
  
          return $response;
      }
code_tokens: public function prepareResponse ( $ result ) { $ response = [ 'header' => null , 'content' => null ] ; $ d = "\r\n\r\n" ; // Headers and content delimiter if ( is_string ( $ result ) && strpos ( $ result , $ d ) !== false ) { list ( $ header , $ content ) = explode ( $ d , $ result , 2 ) ; if ( stripos ( $ header , '100 Continue' ) !== false && strpos ( $ content , $ d ) !== false ) { list ( $ header , $ content ) = explode ( $ d , $ content , 2 ) ; } $ response [ 'header' ] = $ header ; $ response [ 'content' ] = htmlentities ( $ content ) ; } return $ response ; }
docstring: Process the result and split into headers and content
  
  @param string|bool $result
  @return array
docstring_tokens: Process the result and split into headers and content