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 yesterday

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

38

—

LowBetter than 85% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity17

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

1007d 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://www.gravatar.com/avatar/43c2f7aaaf7aacf71902a17233277ebc4a3468bfb9b252fab5367d8220199b73?d=identicon)[mrcage](/maintainers/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

[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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