Skip to content
A package for converting data.
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
src
tests/Unit
.editorconfig
.gitattributes
.gitignore
.styleci.yml
CHANGELOG.md
LICENSE.md
README.md
composer.json
phpstan.neon.dist
phpunit.xml.dist

README.md

Convert

Latest Version on Packagist Software License Build Status Style CI Code Coverage Total Downloads

A package for converting data.

Install

Via Composer

$ composer require pxgamer/convert

Usage

Byte Conversion

Convert from a string to bytes

use pxgamer\Convert\Bytes;

// Metric standard format
Bytes::toInt('1B');
// IEC standard format
Bytes::toInt('1GiB');

Convert from bytes to a human-readable string

use pxgamer\Convert\Bytes;

// This is always formatted as metric in the output
Bytes::toString(1000);

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email security@pxgamer.xyz instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

You can’t perform that action at this time.