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

1.0.0 2022-06-05 12:00 UTC

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"