If [[sizeFormatBase]] is 1024, binary prefixes (e.g. kibibyte/KiB, mebibyte/MiB, ...)
are used in the formatting result.
public asSize ( string | integer | float $value, integer $decimals = null, array $options = [], array $textOptions = [] ) : string | ||
$value | string | integer | float | value in bytes to be formatted. |
$decimals | integer | the number of digits after the decimal point. |
$options | array | optional configuration for the number formatter. This parameter will be merged with [[numberFormatterOptions]]. |
$textOptions | array | optional configuration for the number formatter. This parameter will be merged with [[numberFormatterTextOptions]]. |
return | string | the formatted result. |