public static function endsWith($haystack, $needle) {
		if($needle === null && $haystack === null)
			return true;
		if($needle === null && $haystack !== null)
			return true;
		return $needle === "" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);
	}
public static function endsWith($haystack, $needle) {
		if($needle === null && $haystack === null)
			return true;
		if($needle === null && $haystack !== null)
			return true;
		return $needle === "" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);
	}
public static function endsWith ( $ haystack , $ needle ) { if ( $ needle === null && $ haystack === null ) return true ; if ( $ needle === null && $ haystack !== null ) return true ; return $ needle === "" || ( ( $ temp = strlen ( $ haystack ) - strlen ( $ needle ) ) >= 0 && strpos ( $ haystack , $ needle , $ temp ) !== false ) ; }
Checks if the haystack ends with needle

@param string $haystack
@param string $needle
@return boolean
Checks if the haystack ends with needle