public static function endsWith($needle, $str)
    {
        $end = substr($str, -1*strlen($needle));

        return $end == $needle;
    }
public static function endsWith($needle, $str)
    {
        $end = substr($str, -1*strlen($needle));

        return $end == $needle;
    }
public static function endsWith ( $ needle , $ str ) { $ end = substr ( $ str , - 1 * strlen ( $ needle ) ) ; return $ end == $ needle ; }
Checks if string ends with another string
@param  string  $needle Supposed end
@param  string  $str    Tested string
@return boolean TRUE if string ends with another string, FALSE
otherwise
Checks if string ends with another string