PHPackages                             kang-babi/ph-zip-codes - 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. kang-babi/ph-zip-codes

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

kang-babi/ph-zip-codes
======================

PHP-based Philippine Zip Codes Mapping

v1.5.0(9mo ago)085MITPHP

Since Oct 15Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/kang-babi/philippine-zip-codes)[ Packagist](https://packagist.org/packages/kang-babi/ph-zip-codes)[ RSS](/packages/kang-babi-ph-zip-codes/feed)WikiDiscussions main Synced 1mo ago

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

PH Zip Codes
============

[](#ph-zip-codes)

A PHP library that provides a collection of zip codes and barangays in the Philippines, ideal for applications that need location-based information in the Philippines. **Note**: Cities in the NCR (National Capital Region) may contain multiple zip codes.

Disclaimer
----------

[](#disclaimer)

- The data mapping is done manually, so there may be some incorrect or incomplete data, including potential typographical errors.
- Data may be outdated as some information is subject to change over time.
- Some municipalities may contain empty barangay entries.

### PhAddress

[](#phaddress)

- static methods
- `illuminate/collections` dependent

#### Available Methods (Chained Structure)

[](#available-methods-chained-structure)

- `region($region = "")`: Retrieves a list of all regions. If `$region` is specified, it fetches data for that specific region if it exists.
- `province($province = "")`: Returns a list of provinces within the specified `$region`. If `$province` is provided, it fetches data for that specific province within the given region.
    **Note**: Calling `province` without specifying a `$region` will return an empty result.
- `municipality($municipality = "")`:
    Returns a list of municipalities within the specified `$region` and `$province`. If `$municipality` is provided, it fetches data for that specific municipality within the given region and province.
    **Note**: Calling `municipality` without specifying both `$region` and `$province` will return an empty result.
- In the case of NCR, `zip_codes` in cities (in municipality(...) is a list of associative arrays where each entry maps the keys `zip_code` and `location` to their respective values.
- Sample:

```
    # REGION
    $region = PhAddress::region() # returns list of regions
    $region = PhAddress::region(REGION 5) # returns region 5 provinces

    # PROVINCE
    $province = $region->province() # returns list of provinces in 'REGION 5'
    $province = $region->province(ALBAY) # returns 'ALBAY' municipalities in 'REGION 5'

    # MUNICIPALITY
    $municipality = $province->municipality() # returns list of municipalities of 'ALBAY' in 'REGION 5'
    $municipality = $province->municipality(MALILIPOT) # returns 'MALILIPOT' data including zip_code and barangays

```

###  Health Score

33

—

LowBetter than 74% of packages

Maintenance61

Regular maintenance activity

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Recently: every ~35 days

Total

18

Last Release

278d ago

Major Versions

v1.4.2 → v2.x-dev2025-08-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/b0387b69f67b51e12f244c06d31bd1d65e08be8879170e7ef168881f5f037d68?d=identicon)[kang-babi](/maintainers/kang-babi)

---

Top Contributors

[![kang-babi](https://avatars.githubusercontent.com/u/81248294?v=4)](https://github.com/kang-babi "kang-babi (29 commits)")

### Embed Badge

![Health badge](/badges/kang-babi-ph-zip-codes/health.svg)

```
[![Health](https://phpackages.com/badges/kang-babi-ph-zip-codes/health.svg)](https://phpackages.com/packages/kang-babi-ph-zip-codes)
```

###  Alternatives

[illuminate/support

The Illuminate Support package.

583107.1M34.4k](/packages/illuminate-support)[pragmarx/countries

PHP Countries and Currencies

1.9k3.3M18](/packages/pragmarx-countries)[illuminate/events

The Illuminate Events package.

13454.3M1.7k](/packages/illuminate-events)[illuminate/config

The Illuminate Config package.

10842.7M2.2k](/packages/illuminate-config)[illuminate/pagination

The Illuminate Pagination package.

10532.5M858](/packages/illuminate-pagination)[illuminate/broadcasting

The Illuminate Broadcasting package.

7126.5M177](/packages/illuminate-broadcasting)

PHPackages © 2026

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