original_string: public static function endsWith($haystack, $needles)
      {
          foreach ((array) $needles as $needle) {
              if (substr($haystack, -strlen($needle)) === (string) $needle) {
                  return true;
              }
          }
  
          return false;
      }
code: public static function endsWith($haystack, $needles)
      {
          foreach ((array) $needles as $needle) {
              if (substr($haystack, -strlen($needle)) === (string) $needle) {
                  return true;
              }
          }
  
          return false;
      }
code_tokens: public static function endsWith ( $ haystack , $ needles ) { foreach ( ( array ) $ needles as $ needle ) { if ( substr ( $ haystack , - strlen ( $ needle ) ) === ( string ) $ needle ) { return true ; } } return false ; }
docstring: Determine if a given string ends with a given substring.
  
  @param  string  $haystack
  @param  string|array  $needles
  @return bool
docstring_tokens: Determine if a given string ends with a given substring .