PHPackages                             logicexception/german-administrative-area-keys - 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. logicexception/german-administrative-area-keys

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

logicexception/german-administrative-area-keys
==============================================

german administrative area keys

v0.1.1(5y ago)03BSD-3-ClausePHPPHP &gt;=8.0

Since Jun 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/LogicException/php-german-administrative-area-keys)[ Packagist](https://packagist.org/packages/logicexception/german-administrative-area-keys)[ RSS](/packages/logicexception-german-administrative-area-keys/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

german administrative area keys
===============================

[](#german-administrative-area-keys)

This package contains types and classes for german area keys AGS (Amtlicher Gemeindeschlüssel) and ARS (Amtlicher Regionalschlüssel).

You can download the latest record of all german administrative areas from:

[https://www.destatis.de/DE/Themen/Laender-Regionen/Regionales/Gemeindeverzeichnis/\_inhalt.html](https://www.destatis.de/DE/Themen/Laender-Regionen/Regionales/Gemeindeverzeichnis/_inhalt.html)

How to use
----------

[](#how-to-use)

### AGS

[](#ags)

Provides a class which represents an *Amtlichen Gemeindeschlüssel* data object. You can create a new object by passing each part of an AGS via constructor or parse an AGS String via static fromString method.

```
// pass each part of AGS as constructor parameter
$ags = new AGS("14", "7", "30", "070");

// pass full AGS string via parseString method
$ags = AGS::fromString("14730070");
```

### ARS

[](#ars)

Provides a class which represents an *Amtlichen Regionalschlüssel* data object. Similar to the AGS class you can pass each part of an ARS via constructor parameter or parse an ARS String via static fromString method.

```
// pass each part of ARS as constructor parameter
$ars = new ARS("14", "7", "30", "0070", "070");

// pass full ARS string via parseString method
$ars = ARS::fromString("147300070070");
```

Technically an ARS is an AGS with a little more information (Verbandsschlüssel). So it is possible to extract an AGS from an ARS. Conversely, you cannot create an ARS from an AGS because the lack of information (Verbandsschlüssel).

```
$ars = new ARS("14", "7", "30", "0070", "070");
$ags = ars->toAGS();

echo (string)$ags;
// prints: "14730070"
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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 ~3 days

Total

2

Last Release

1829d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/68a57ec3d7c559ea41dea1737ba889f1a7de1e68ed5f43fcd97745aac77a5cbc?d=identicon)[LogicException](/maintainers/LogicException)

---

Tags

agsarsgemeindeschluesselregionalschluessel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/logicexception-german-administrative-area-keys/health.svg)

```
[![Health](https://phpackages.com/badges/logicexception-german-administrative-area-keys/health.svg)](https://phpackages.com/packages/logicexception-german-administrative-area-keys)
```

PHPackages © 2026

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