PHPackages                             steefdw/airports - 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. steefdw/airports

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

steefdw/airports
================

Airports

v0.1.1(2y ago)09MITPHPPHP ^8.2

Since Jun 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/steef-paqt/airports)[ Packagist](https://packagist.org/packages/steefdw/airports)[ RSS](/packages/steefdw-airports/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

Airports
========

[](#airports)

Inspired by CGP Grey's video: [✈️ The Maddening Mess of Airport Codes! ✈️](https://www.youtube.com/watch?v=jfOUVYQnuhw)

Installation
------------

[](#installation)

```
composer require steefdw/airports
```

Usage
-----

[](#usage)

Get an airport by its IATA code:

```
$amsterdam = Airports::getAirport('AMS');
// Steefdw\Airports\Airport^ {
//   +icao: "EHAM"
//   +iata: "AMS"
//   +name: "Amsterdam Airport Schiphol"
//   +city: "Amsterdam"
//   +state: "North-Holland"
//   +country: "NL"
//   +elevation: -11
//   +lat: 52.3086013794
//   +lon: 4.7638897896
//   +timezone: "Europe/Amsterdam"
// }
```

Get the distance between two airports:

```
$amsterdam = Airports::getAirport('AMS');
$barcelona = Airports::getAirport('BCN');

$distance = $amsterdam->getDistance($barcelona); // 1241.0765638345 (km)
```

Get the time difference between two airports:

```
$amsterdam = Airports::getAirport('AMS');
$london = Airports::getAirport('LTN');

$timeDiff = $amsterdam->getTimeDiff($london); // -1 (hour)
```

Get an array of airports:

```
Airports::getAirports(); // get all ~29k airports in the world
Airports::getIataAirports(); // only the 7780 airports that have a three-letter IATA code.
Airports::getAirportsByCountryCode('nl'); // only get the 27 airports in the Netherlands
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

Unknown

Total

1

Last Release

735d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/856394?v=4)[Steef de Winter](/maintainers/steefdw)[@steefdw](https://github.com/steefdw)

---

Top Contributors

[![steef-paqt](https://avatars.githubusercontent.com/u/59729886?v=4)](https://github.com/steef-paqt "steef-paqt (7 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/steefdw-airports/health.svg)

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

###  Alternatives

[illuminate/support

The Illuminate Support package.

630113.0M41.3k](/packages/illuminate-support)[spatie/holidays

Calculate public holidays

402860.1k2](/packages/spatie-holidays)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

293952.6k33](/packages/craftcms-feed-me)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k18](/packages/solspace-craft-freeform)[pimcore/data-importer

Adds a comprehensive import functionality to Pimcore Datahub

46855.5k5](/packages/pimcore-data-importer)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)

PHPackages © 2026

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