WireNumberTools::bytesToStr()
Given a quantity of bytes (int), return readable string that refers to quantity in bytes, kB, MB, GB and TB
Available since version 3.0.214. All versions can also use the wireBytesStr() function
Usage
// basic usage
$string = $wireNumberTools->bytesToStr($bytes);
// usage with all arguments
$string = $wireNumberTools->bytesToStr($bytes, $options = []);
Arguments
Name | Type(s) | Description |
---|---|---|
$bytes | int string | Quantity in bytes (int) or any string accepted by strToBytes method. |
$options (optional) | array int | Options to modify default behavior, or if an integer then
|
Return value
string
WireNumberTools methods and properties
API reference based on ProcessWire core version 3.0.251