Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ixnode/php-size-byte

PHP Size Byte
https://github.com/ixnode/php-size-byte

Last synced: 10 days ago
JSON representation

PHP Size Byte

Awesome Lists containing this project

README

        

# PHP Size Byte

This library converts given size into human-readable size.

## Installation

```bash
composer require ixnode/php-size-byte
```

```bash
vendor/bin/php-size-byte -V
```

```bash
php-size-byte 0.1.0 (12-19-2022 01:17:26) - Björn Hempel
```

## Usage

```php
use Ixnode\PhpSizeByte\SizeByte;
```

```php
$sizeHumanReadable = (new SizeByte($fileSize))->getHumanReadable();
```

## Development

```bash
git clone [email protected]:ixnode/php-size-byte.git && cd php-size-byte
```

```bash
composer install
```

```bash
composer test
```

## License

This tool is licensed under the MIT License - see the [LICENSE](/LICENSE) file for details