Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/ixnode/php-size-byte
- Owner: ixnode
- License: mit
- Created: 2022-12-18T23:18:49.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-19T09:57:59.000Z (almost 2 years ago)
- Last Synced: 2024-09-21T14:08:31.984Z (about 2 months ago)
- Language: Shell
- Size: 30.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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