public static function endsWith($needle, $haystack, $caseSensitive = true)
    {
        list($needle, $haystack) = self::transformCase($needle, $haystack, $caseSensitive);

        return (self::substring($haystack, -(self::length($needle))) === $needle);
    }
public static function endsWith($needle, $haystack, $caseSensitive = true)
    {
        list($needle, $haystack) = self::transformCase($needle, $haystack, $caseSensitive);

        return (self::substring($haystack, -(self::length($needle))) === $needle);
    }
public static function endsWith ( $ needle , $ haystack , $ caseSensitive = true ) { list ( $ needle , $ haystack ) = self :: transformCase ( $ needle , $ haystack , $ caseSensitive ) ; return ( self :: substring ( $ haystack , - ( self :: length ( $ needle ) ) ) === $ needle ) ; }
Check if string ends with another string

@param string $needle String to look for
@param string $haystack String to check
@param bool $caseSensitive Case sensitive check

@return bool
Check if string ends with another string