Core Function
View Source on Trac ↗ size_format()
size_format( mixed $bytes, mixed $decimals = 0 ) Converts a number of bytes to the largest unit the bytes will fit into.
Parameters 1 required
| Name / Type | Description |
|---|---|
| (int | | string) $bytes Number of bytes. Note max integer size for integers. Required |
| $decimals int | Optional. Precision of number of decimal places. Default 0. |
Return Value
((string)
| false) Number string on success, false on failure.
Function Information
Since Version
2.3.0
Source File
wp-includes/functions.php
Advertisement