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(11mo ago)087MITPHP

Since Oct 15Pushed 11mo 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 today

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

31

—

LowBetter than 66% of packages

Maintenance52

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

335d ago

Major Versions

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

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/81248294?v=4)[Joshua Benosa](/maintainers/kang-babi)[@kang-babi](https://github.com/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.

630113.0M41.4k](/packages/illuminate-support)[illuminate/events

The Illuminate Events package.

13557.0M2.1k](/packages/illuminate-events)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[illuminate/config

The Illuminate Config package.

10944.5M2.5k](/packages/illuminate-config)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/session

The Illuminate Session package.

9939.3M849](/packages/illuminate-session)

PHPackages © 2026

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