PHPackages                             mrcage/chf-exchange-rates - 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. mrcage/chf-exchange-rates

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

mrcage/chf-exchange-rates
=========================

Retrieves Swiss Franc exchange rates for foreign currencies based on data from the website of the Swiss Federal Customs Administration.

3.0.0(2y ago)01.1k[1 PRs](https://github.com/mrcage/chf-exchange-rates-php/pulls)LGPL-3.0-or-laterPHPPHP ^8.1.

Since Mar 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mrcage/chf-exchange-rates-php)[ Packagist](https://packagist.org/packages/mrcage/chf-exchange-rates)[ RSS](/packages/mrcage-chf-exchange-rates/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (9)Dependencies (3)Versions (13)Used By (0)

Swiss Franc exchange rate query library for PHP
===============================================

[](#swiss-franc-exchange-rate-query-library-for-php)

Retrieves Swiss Franc exchange rates for foreign currencies based on data from the website of the Swiss Federal Customs Administration.

The library uses internal caching of requested data (cache time is one week).

Usage
-----

[](#usage)

### Include class

[](#include-class)

```
use MrCage\EzvExchangeRates\EzvExchangeRates;

```

### Get exchange rate for current day

[](#get-exchange-rate-for-current-day)

```
$rate = EzvExchangeRates::getExchangeRate('EUR');

```

### Get exchange rate for a day in the past

[](#get-exchange-rate-for-a-day-in-the-past)

The date must be specified as [Carbon](http://carbon.nesbot.com) date object.

```
$rate = EzvExchangeRates::getExchangeRate('USD', Carbon::yesterday());

```

### Get all available currencies

[](#get-all-available-currencies)

```
$currencies = EzvExchangeRates::listCurrencies();

```

This will return a list of currency codes as an array, the key being the (uppercase) currency code, and the value being the base value used for the exchange rate.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 95.5% 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

Every ~198 days

Recently: every ~284 days

Total

11

Last Release

1060d ago

Major Versions

1.5.1 → 2.0.02022-04-15

2.0.0 → 3.0.02023-08-09

PHP version history (3 changes)1.0.0PHP &gt;=7.1.3

2.0.0PHP ^8.0.2

3.0.0PHP ^8.1.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1665428?v=4)[Nicolas Perrenoud](/maintainers/mrcage)[@mrcage](https://github.com/mrcage)

---

Top Contributors

[![mrcage](https://avatars.githubusercontent.com/u/1665428?v=4)](https://github.com/mrcage "mrcage (21 commits)")[![usp-npe](https://avatars.githubusercontent.com/u/54637199?v=4)](https://github.com/usp-npe "usp-npe (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mrcage-chf-exchange-rates/health.svg)

```
[![Health](https://phpackages.com/badges/mrcage-chf-exchange-rates/health.svg)](https://phpackages.com/packages/mrcage-chf-exchange-rates)
```

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M307](/packages/laravel-horizon)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)

PHPackages © 2026

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