chrisullyott/php-filesize
A small, Composer-installable PHP library for converting byte counts into readable file sizes like 1.5 MB and back again. It provides straightforward formatting with configurable precision and units, useful for dashboards, uploads, and CLI output.
php-filesize is a lightweight PHP utility for converting raw byte counts into human-readable file sizes. Instead of scattering rounding and unit logic across your codebase, you get a single, predictable helper that turns integers like 1234567 into clean strings such as 1.18 MB.
It has no dependencies and works anywhere PHP does, making it a natural fit for dashboards, file managers, upload limits, and log output.
How can I help you explore Laravel packages today?