Okay, we lied... it's 14.8 Megabytes, but it's sooo worth it.
composer require anteris-dev/units-of-information-helper:dev-master
This package helps convert units of information (Bits, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, etc.) to other units of information and readable strings.
use Anteris\Helper\UnitsOfInformation\Gigabyte;
use Anteris\Helper\UnitsOfInformation\Megabyte;
Gigabyte::toMegabyte(2); // 2048
// OR
Megabyte::fromGigabyte(2); // 2048
use Anteris\Helper\UnitsOfInformation\Kilobyte;
use Anteris\Helper\UnitsOfInformation\Human;
// Outputs: 1.00 MB
echo Human::megabyte(
Kilobyte::toMegabyte(1028)
);