Skip to content

Commit 4a439e8

Browse files
committed
IHF: format_bytes doc added.
1 parent 668b0eb commit 4a439e8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ Provides Laravel-specific and pure PHP helper functions.
2323
- [Dump](#dump)
2424
- [get_dump](#get_dump)
2525
26+
- [Format](#format)
27+
- [format_bytes](#format_bytes)
28+
2629
- [Json](#json)
2730
- [is_json](#is_json)
2831
@@ -55,6 +58,17 @@ $dump = get_dump($var);
5558
// ]
5659
```
5760

61+
## Format
62+
63+
#### `format_bytes()`
64+
65+
Formats bytes into kilobytes, megabytes, gigabytes or terabytes, with specified precision:
66+
```php
67+
$formatted = format_bytes(3333333);
68+
69+
// 3.18 MB
70+
```
71+
5872
## Json
5973

6074
#### `is_json()`

0 commit comments

Comments
 (0)