public static function stringEndsWith($haystack, $needle)
    {
        if (!is_string($haystack) || !is_string($needle)) {
            throw new \InvalidArgumentException('Not a string');
        }

        return (strrpos($haystack, $needle) + strlen($needle)) === strlen($haystack);
    }
public static function stringEndsWith($haystack, $needle)
    {
        if (!is_string($haystack) || !is_string($needle)) {
            throw new \InvalidArgumentException('Not a string');
        }

        return (strrpos($haystack, $needle) + strlen($needle)) === strlen($haystack);
    }
public static function stringEndsWith ( $ haystack , $ needle ) { if ( ! is_string ( $ haystack ) || ! is_string ( $ needle ) ) { throw new \ InvalidArgumentException ( 'Not a string' ) ; } return ( strrpos ( $ haystack , $ needle ) + strlen ( $ needle ) ) === strlen ( $ haystack ) ; }
Determine if a string ends with a particular sequence.

@param string $haystack
@param string $needle

@throws \InvalidArgumentException

@return bool
Determine if a string ends with a particular sequence .