Skip to content

About

Human-friendly formatting for PHP numbers, byte sizes, money, durations, strings, and arrays with predictable output and optional Intl locales.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

PHP Version : 8.5 License Tests
Source Packagist Version Packagist Downloads

Human-friendly numbers, sizes, money and durations for PHP.

Format numbers, byte sizes, money and durations into readable text with predictable output, plus optional Intl locales.

Installation

composer require pharaonic/php-readable

Usage

use Pharaonic\Readable\{Bytes, Duration, Money, Number};

Number::compact(1250000);           // "1.3M"
Bytes::format(1536, binary: true);  // "1.5 KiB"
Money::format(1234.5, 'USD');       // "USD 1,234.50"
Duration::format(3661);             // "1 hour 1 minute 1 second"

Documentation

Full documentation: PHP Readable Documentation.

Support & Security

See SUPPORT.md and SECURITY.md. Contributions are welcome; see CONTRIBUTING.md.

License

MIT. See LICENSE.

About

Human-friendly formatting for PHP numbers, byte sizes, money, durations, strings, and arrays with predictable output and optional Intl locales.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages