PHPackages                             phdevutils/postal - 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. phdevutils/postal

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

phdevutils/postal
=================

Philippine ZIP/postal codes with zero-dependency lookup helpers. Joins to phdevutils/core cities/municipalities. Data from GeoNames (CC BY 4.0).

v0.2.0(1mo ago)00MITPHPPHP &gt;=8.1

Since May 28Pushed 1mo agoCompare

[ Source](https://github.com/kon2raya24/ph-postal-php)[ Packagist](https://packagist.org/packages/phdevutils/postal)[ RSS](/packages/phdevutils-postal/feed)WikiDiscussions main Synced 1w ago

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

phdevutils/postal
=================

[](#phdevutilspostal)

[![Packagist version](https://camo.githubusercontent.com/ee3a1e0f53424db2df264b6f8bf6ade950fe1db51822d43c8cc98e21af1b5bdb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70686465767574696c732f706f7374616c3f6c6162656c3d5061636b616769737426636f6c6f723d663238643161266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/phdevutils/postal)[![npm version](https://camo.githubusercontent.com/631deb2c720cd1baa4450217f11ceb6ec883bdda3e1e4e323d2a389cee0eb691/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f4070682d6465762d7574696c732f706f7374616c3f6c6162656c3d6e706d26636f6c6f723d636233383337266c6f676f3d6e706d)](https://www.npmjs.com/package/@ph-dev-utils/postal)[![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/kon2raya24/ph-postal/blob/main/LICENSE)

**Philippine ZIP / postal codes** with zero-dependency lookup helpers. Every ZIP joins to a PSGC city/municipality in [`phdevutils/core`](https://packagist.org/packages/phdevutils/core).

```
composer require phdevutils/postal
```

Usage
-----

[](#usage)

```
use PhDevUtils\Postal\PostalCodes;

// Find by ZIP — always returns a list (PH ZIPs are not unique)
PostalCodes::findByZip('1000');   // [['zip'=>'1000','cityMun'=>'Manila','cityMunCode'=>'133900','region'=>'13', ...]]
PostalCodes::findByZip('6000');   // Cebu City → cityMunCode '072217'

// Find by city name (case-insensitive), optional filter
PostalCodes::findByCity('Davao City');

// List / count, filter by { zip, cityMunCode, province, region }
PostalCodes::list(['region' => '13']);          // all NCR
PostalCodes::list(['cityMunCode' => '072217']);  // all Cebu City ZIPs
PostalCodes::count();                            // 2048
PostalCodes::count(['region' => '13']);          // 360
```

Each entry is an associative array:

```
[
  'zip'         => '1000',
  'cityMun'     => 'Manila',
  'cityMunCode' => '133900', // 6-digit PSGC parent (joins phdevutils/core), or null if unmatched
  'province'    => null,     // 4-digit, or null for NCR/HUC
  'region'      => '13',     // 2-digit
  'area'        => null,     // district/locality detail, or null
]
```

Joining to PSGC
---------------

[](#joining-to-psgc)

```
use PhDevUtils\Address;

$zip  = PostalCodes::findByZip('6000')[0];
$city = Address::findCityMunicipality($zip['cityMunCode']); // ['name' => 'City of Cebu', 'province' => '0722', ...]
```

Notes
-----

[](#notes)

- ZIPs are not unique; Metro Manila is district-level and rolls up to Manila city `133900`.
- ~6% of entries have `cityMunCode` null (barangay-level / spelling-variant places); they still carry `region`.

Data &amp; attribution
----------------------

[](#data--attribution)

Derived from **GeoNames** (CC BY 4.0) joined to **PSA Q4 2024 PSGC**, reconciled against the PHLPost locator. Community-sourced, not an official PHLPost feed — verify against [PHLPost](https://phlpost.gov.ph) for production-critical use.

License
-------

[](#license)

MIT (code). Bundled data © GeoNames, CC BY 4.0.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance89

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

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

Total

2

Last Release

58d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ea8892a6c7ba804d12cac27e5927f4b7695d3fc63fec0ecd512d07c117246d6a?d=identicon)[kon2raya24](/maintainers/kon2raya24)

---

Top Contributors

[![kon2raya24](https://avatars.githubusercontent.com/u/167972097?v=4)](https://github.com/kon2raya24 "kon2raya24 (3 commits)")

---

Tags

composerphilippinesphppostalzip-codesaddresszipzipcodepostcodepostal-codephilippinespsgcfilipino

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phdevutils-postal/health.svg)

```
[![Health](https://phpackages.com/badges/phdevutils-postal/health.svg)](https://phpackages.com/packages/phdevutils-postal)
```

###  Alternatives

[pragmarx/zipcode

A worldwide address-by-zipcode searcher.

10265.8k](/packages/pragmarx-zipcode)[canducci/zipcode

ZipCode From Brazil

4555.8k](/packages/canducci-zipcode)[flyingluscas/viacep-php

ViaCEP PHP SDK

3540.6k](/packages/flyingluscas-viacep-php)

PHPackages © 2026

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