API / Minn\Support / ByteSize

ByteSize final class

Minn\Support\ByteSize · public/minn/src/Minn/Support/ByteSize.php · 18 lines

A count of bytes as a person reads it (size_format): in the largest unit it reaches, from bytes to exabytes in steps of 1024, the number written for the site's locale.

Constants and properties

privateUNITS = array ( 'EB' => 1152921504606846976, 'PB' => 1125899906842624, 'TB' => 1099511627776, 'GB' => 1073741824, 'MB' => 1048576, 'KB' => 1024, 'B' => 1, )

Public

staticformat(mixed $bytes, mixed $decimals = 0): mixed#

The size with the decimals asked for; false for less than a byte.