rych/bytesize
A lightweight PHP package for parsing and formatting byte sizes. Convert human-readable values such as 1.5 MB into bytes and back again, making it useful for file-size validation, storage limits, and user-friendly display.
1.5 MB vs 1536 KB vs 1572864). This package is a candidate for that one job.MB vs MiB inconsistently.Consider it when:
Look elsewhere (or build it) when:
formatBytes() helper you own is likely cheaper over a multi-year horizon than carrying an abandoned dependency through framework upgrades."1.5 GB" → bytes), configurable SI vs. binary units, precision rules, localization, or validation of size limits are all outside this package's scope.For executives (one paragraph): We evaluated a small open-source PHP library for displaying file and storage sizes in human-readable form. It does one narrow thing well and is free to use, but it hasn't been updated since 2014 and has no meaningful adoption. Our recommendation is not to add it as a dependency: the same behavior is roughly thirty lines of code we can own outright, which removes an unmaintained component from our upgrade path at essentially no cost. This is a low-stakes, low-spend decision with no impact on roadmap or revenue.
For engineering:
How can I help you explore Laravel packages today?