public static function EndsWith($haystack, $needle)
    {
        $length = static::Length($needle);

        return $length === 0 || (substr($haystack, -$length) === $needle);
    }
public static function EndsWith($haystack, $needle)
    {
        $length = static::Length($needle);

        return $length === 0 || (substr($haystack, -$length) === $needle);
    }
public static function EndsWith ( $ haystack , $ needle ) { $ length = static :: Length ( $ needle ) ; return $ length === 0 || ( substr ( $ haystack , - $ length ) === $ needle ) ; }
Determine if the given string ends with the given substring.

@param string $haystack string
@param string $needle   substring

@return bool
Determine if the given string ends with the given substring .