original_string: public function endsWith(string $haystack, string $needle): bool
      {
          $escaped = preg_quote($needle);
  
          return (bool) preg_match("/$escaped$/", $haystack);
      }
code: public function endsWith(string $haystack, string $needle): bool
      {
          $escaped = preg_quote($needle);
  
          return (bool) preg_match("/$escaped$/", $haystack);
      }
code_tokens: public function endsWith ( string $ haystack , string $ needle ) : bool { $ escaped = preg_quote ( $ needle ) ; return ( bool ) preg_match ( "/$escaped$/" , $ haystack ) ; }
docstring: Checks if a string ends with another one.
  
  @param string $haystack The string to search in
  @param string $needle   The string to search for
  
  @return bool
docstring_tokens: Checks if a string ends with another one .