From daacf0e2bb30f5a869323b81570acb8d16e60fae Mon Sep 17 00:00:00 2001 From: "gabriele.lana" Date: Tue, 2 Aug 2016 15:19:56 +0200 Subject: [PATCH] Add System::numberOfBytes documentation --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 80e56d1..f0f91e1 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,10 @@ echo ByteUnits\bytes(1322123)->format('GB/9'); // outputs 0.001322123GB // You can specify a separator between then number and the units echo ByteUnits\bytes(1322000)->format('MB', ' '); // outputs 1.32 MB echo ByteUnits\bytes(1322000)->format('MB', '/'); // outputs 1.32/MB + +// If you don't want to format but get the number of bytes +// NOTE: The output is a string to ensure that there's no overflow +echo ByteUnits\bytes(1322000)->numberOfBytes(); // outputs 1322000 ``` ### Compare