PHP package to format numbers according to SI standards (e.g. mm, millimeter, Km, GB, Gigabyte, Gibibyte)
You can install the package via composer:
composer require toolstud-io/si_format
$obj = new ToolstudIo\SiFormat(false,"m");
echo $obj->format(1000000);
// returns "1km"
echo $obj->format(.001);
// returns "1mm"
$obj = new ToolstudIo\SiFormat(false,"B",1024);
echo $obj->format(1024);
// returns "1KB"
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email author_email instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.