public function endswith(string $haystack, string $needle) : bool
    {
        return (substr($haystack, -1 * strlen($needle)) === $needle);
    }
public function endswith(string $haystack, string $needle) : bool
    {
        return (substr($haystack, -1 * strlen($needle)) === $needle);
    }
public function endswith ( string $ haystack , string $ needle ) : bool { return ( substr ( $ haystack , - 1 * strlen ( $ needle ) ) === $ needle ) ; }
String endswith.
@param string $haystack The input string.
@param string $needle The string search for.
@return bool Returns true if the $haystack starts with the $needle, otherwise false.
String endswith .