formatBytes() публичный статический Метод

public static formatBytes ( $bytes, $context, $precision, null $languageCode = null ) : mixed | null | string
$bytes
$context
$precision
$languageCode null
Результат mixed | null | string
Пример #1
0
/**
 * Get formatted byte string
 *
 * Returns a string containing a rounded numeric value and appropriate 'B', 'KB', 'MB', 'GB', 'TB', 'PB' modifiers.
 *
 * @param int $bytes Size in bytes.
 * @param string $context plugin name
 * @param int $precision number of digits after the decimal point
 * @param string $languageCode
 * @return string A string formatted in byte size units.
 */
function ipFormatBytes($bytes, $context, $precision = 0, $languageCode = null)
{
    return \Ip\Internal\FormatHelper::formatBytes($bytes, $context, $precision, $languageCode);
}