public static function endsWith($string, $substrings)
    {
        if (is_array($substrings)) {
            foreach ((array) $substrings as $substring) {
                if ((string) $substring === static::subString($string, -static::length($substring))) {
                    return true;
                }
            }
        } elseif (is_string($substrings)) {
            if ((string) $substring === static::subString($string, -static::length($substring))) {
                return true;
            }
        }

        return false;
    }
public static function endsWith($string, $substrings)
    {
        if (is_array($substrings)) {
            foreach ((array) $substrings as $substring) {
                if ((string) $substring === static::subString($string, -static::length($substring))) {
                    return true;
                }
            }
        } elseif (is_string($substrings)) {
            if ((string) $substring === static::subString($string, -static::length($substring))) {
                return true;
            }
        }

        return false;
    }
public static function endsWith ( $ string , $ substrings ) { if ( is_array ( $ substrings ) ) { foreach ( ( array ) $ substrings as $ substring ) { if ( ( string ) $ substring === static :: subString ( $ string , - static :: length ( $ substring ) ) ) { return true ; } } } elseif ( is_string ( $ substrings ) ) { if ( ( string ) $ substring === static :: subString ( $ string , - static :: length ( $ substring ) ) ) { return true ; } } return false ; }
Check ifstring ends with another string of collection of strings.

@param string       $string
@param string|array $substring

@return bool
Check ifstring ends with another string of collection of strings .