PHPackages                             indibeast/currency-formatter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. indibeast/currency-formatter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

indibeast/currency-formatter
============================

Currency Formatter

v1.0(10y ago)201092[1 PRs](https://github.com/indibeast/currency-format/pulls)MITPHPPHP &gt;=5.5.0

Since Mar 14Pushed 6y ago4 watchersCompare

[ Source](https://github.com/indibeast/currency-format)[ Packagist](https://packagist.org/packages/indibeast/currency-formatter)[ RSS](/packages/indibeast-currency-formatter/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Currency Formatter
==================

[](#currency-formatter)

[![Build Status](https://camo.githubusercontent.com/4c46f8b3a55d37a922ed75589b309e821a49596ab5a31e00085e491c5c653565/68747470733a2f2f7472617669732d63692e6f72672f696e646962656173742f63757272656e63792d666f726d61742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/indibeast/currency-format)[![Coverage Status](https://camo.githubusercontent.com/9c16799e399b45b576b50b7fa0df84693d84516e7772c82a34e91cc44b552444/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f696e646962656173742f63757272656e63792d666f726d61742f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/indibeast/currency-format?branch=master)[![Code Climate](https://camo.githubusercontent.com/94555351788abde7229d475a241b854dc58f7f07a48847c7d9e617a50e560773/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f696e646962656173742f63757272656e63792d666f726d61742f6261646765732f6770612e737667)](https://codeclimate.com/github/indibeast/currency-format)[![Total Downloads](https://camo.githubusercontent.com/920a54dbd0f8edd3c7d08cbf4a19e2d544566d660878f4b2f4303d79394a327a/68747470733a2f2f706f7365722e707567782e6f72672f696e646962656173742f63757272656e63792d666f726d61747465722f646f776e6c6f616473)](https://packagist.org/packages/indibeast/currency-formatter)[![Latest Unstable Version](https://camo.githubusercontent.com/eb607adfc49a50aa81fe92f7470cc91da35ba5d873a53bd94ee1a9a5eb644706/68747470733a2f2f706f7365722e707567782e6f72672f696e646962656173742f63757272656e63792d666f726d61747465722f762f756e737461626c65)](https://packagist.org/packages/indibeast/currency-formatter)[![License](https://camo.githubusercontent.com/e498eead712d82d9ee1af0a4850acd2e46ea48c48fb9ce5a3d2ab64f28f95b34/687474703a2f2f696d672e736869656c64732e696f2f3a6c6963656e73652d6d69742d626c75652e737667)](http://doge.mit-license.org)

Minimum Requirements
--------------------

[](#minimum-requirements)

- PHP 5.5+

Installation
------------

[](#installation)

Install using composer:

```
composer require indibeast/currency-formatter
```

Example
-------

[](#example)

```
 $price = new Currency\Price(3000,'LKR');
 $price->pretty();// Rs 3,000.00
```

You can pass the options as an array to the third parameter.

```
 $price = new Currency\Price(3000,'LKR',['show_decimal' => false,'seperator' => ',']);
 $price->pretty();// Rs 3,000
```

Currency conversion

```
 $currency = new Price(1,'USD');
 $currency->setConverter(new OpenExchangeConverter('app_id'));// Pass true as second parameter if you are having an enterprise APP_ID.
 $currency->convert('LKR') // This will convert U.S Dollars to Sri Lankan Rupees
```

If you wish to implement your own currency exchange provider implement \\Currency\\Converter\\ConverterInterface

```
 class FixedConverter implements ConverterInterface{

    /**
     * @return float
     */
    public function getConversionRate($code,$to)
    {
        return 1;
    }
 }
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/indibeast/currency-format/blob/master/LICENSE) for more information.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3765d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f142486578cebceab0076cddde3ef02cab97a5936c8870847f47020b7eaeab31?d=identicon)[indibeast](/maintainers/indibeast)

---

Top Contributors

[![indibeast](https://avatars.githubusercontent.com/u/5730822?v=4)](https://github.com/indibeast "indibeast (16 commits)")[![badtux](https://avatars.githubusercontent.com/u/606245?v=4)](https://github.com/badtux "badtux (1 commits)")

---

Tags

formattercurrency

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/indibeast-currency-formatter/health.svg)

```
[![Health](https://phpackages.com/badges/indibeast-currency-formatter/health.svg)](https://phpackages.com/packages/indibeast-currency-formatter)
```

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

23.9k69.5k](/packages/grumpydictator-firefly-iii)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k39](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[firefly-iii/data-importer

Firefly III Data Import Tool.

8035.8k](/packages/firefly-iii-data-importer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
