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);
	}