sergeyakovlev / int-format
The function formats an integer with grouped thousands and optionally +/− signs
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/sergeyakovlev/int-format
Requires
- php: >=7.4
Requires (Dev)
- phpunit/phpunit: >=9.5
This package is auto-updated.
Last update: 2025-09-28 14:06:20 UTC
README
The function formats an integer with grouped thousands and optionally +/− signs.
Install
Install via Composer:
$ composer require sergeyakovlev/int-format
Usage
use function SergeYakovlev\IntFormat\int_format; $value = -1000000; // Use cases are equivalent $formatted_value = int_format($value); $formatted_value = int_format($value, ' ', '', '−'); // $formatted_value = "−1 000 000"