• Модуль: pull
  • Путь к файлу: ~/bitrix/modules/pull/lib/event.php
  • Класс: BitrixPullEvent
  • Вызов: Event::getBytes
static function getBytes($variable)
{
	$bytes = 0;

	if (is_string($variable))
	{
		$bytes += mb_strlen($variable);
	}
	else if (is_array($variable))
	{
		foreach ($variable as $value)
		{
			$bytes += self::getBytes($value);
		}
	}
	else
	{
		$bytes += mb_strlen((string)$variable);
	}

	return $bytes;
}