PHPackages                             arcreative/php-address-format - 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. arcreative/php-address-format

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

arcreative/php-address-format
=============================

Simple address formatting for the masses

0.0.2(12y ago)381.9k↓29.2%1MITPHP

Since Jun 21Pushed 12y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (3)Used By (1)

php-address-format
------------------

[](#php-address-format)

Simple address formatting for the masses

#### Usage

[](#usage)

```
$af = new AddressFormat();
$formattedAddress = $af->format(array(
    'address' => '1234 Some St.',
    'address2' => 'Floor #67',
    'address3' => 'Unit #123',
    'city' => 'San Francisco',
    'subdivision' => 'CA',
    'postalCode' => '94105',
    'countryCode' => 'US'
));
```

will output

```
array(
  '1234 Some St.',
  'Floor #67',
  'Unit #123',
  'San Francisco, CA 94105'
)
```

If a line does not have any information, it will be omitted.

No fields are required to call the formatter, but the only property that will invoke some logic is the [ISO 3166 Alpha-2 country code](http://www.iso.org/iso/country_codes.htm), for which an index can be found [here](https://www.iso.org/obp/ui/#search).

#### Contributions

[](#contributions)

Gladly accepting contributions, hopefully in the form of additional countries. Regardless of current tests being a bit naive, please include tests for added countries to ensure the output is as expected.

#### Other implementations

[](#other-implementations)

- Node/JS - [arcreative/node-address-format](https://github.com/arcreative/node-address-format)

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

2

Last Release

4393d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/509b2e72a52ae7dff2a78bd1c1a649c06aa48eac2fbe12d5365d526a538a4ff7?d=identicon)[arcreative](/maintainers/arcreative)

---

Top Contributors

[![arcreative](https://avatars.githubusercontent.com/u/1896026?v=4)](https://github.com/arcreative "arcreative (6 commits)")

### Embed Badge

![Health badge](/badges/arcreative-php-address-format/health.svg)

```
[![Health](https://phpackages.com/badges/arcreative-php-address-format/health.svg)](https://phpackages.com/packages/arcreative-php-address-format)
```

###  Alternatives

[yansongda/supports

common components

211.4M32](/packages/yansongda-supports)

PHPackages © 2026

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