• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/util.php
  • Класс: BitrixTasksUtil
  • Вызов: Util::hashCode
static function hashCode($str)
{
	$str = (string) $str;
	if($str == '')
	{
		return 0;
	}

	$hash = 0;
	for ($i = 0; $i < mb_strlen($str); $i++)
	{
		$c = ord($str[$i]);
		$hash = (($hash << 5) - $hash) + $c;
		$hash = (int)$hash;
		$hash &= $hash;
	}
	return $hash;
}