PHPackages                             michaellindahl/php-h3 - 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. michaellindahl/php-h3

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

michaellindahl/php-h3
=====================

H3: The hexagonal hierarchical geospatial indexing system system rewritten in PHP.

2.1.0(3y ago)726.6k↓20.1%4[2 PRs](https://github.com/michaellindahl/php-h3/pulls)MITPHPPHP ^7.4 | ^8.0CI passing

Since Jun 24Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/michaellindahl/php-h3)[ Packagist](https://packagist.org/packages/michaellindahl/php-h3)[ RSS](/packages/michaellindahl-php-h3/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (6)Used By (0)

A PHP Library for H3: A Hexagonal Hierarchical Geospatial Indexing System
=========================================================================

[](#a-php-library-for-h3-a-hexagonal-hierarchical-geospatial-indexing-system)

This project provides a PHP implementation of the H3 system. The goal of this library is to minimize the complexity and requires for using the H3 library in PHP. All functions are rewritten in PHP so that there are no dependencies.

Use
---

[](#use)

The test are a great place to look to see each of the supported methods in action. Currently, not all methods of the library are supported, but please feel free to PR any missing methods that you may need.

```
$h3 = new MichaelLindahl\H3\H3(H3::DYLIB);
$h3Index = $h3->latLngToCell(40.689421843699, -74.044431399909, 10);

// $h3Index: '8a2a1072b59ffff'

```

Structure
---------

[](#structure)

This package is structed with `H3.php` as the main entry point and shared location for any constants used throughout the library. Each section of the [API Reference](https://h3geo.org/docs/api) is given it's own `Trait` and `Test` file to help maintain organization.

Building the `bin` directory
----------------------------

[](#building-the-bin-directory)

In order to build the `bin` directory on macOS a cross-compiler that is capable of generating Linux objects must be used, e.g.:

```
brew install FiloSottile/musl-cross/musl-cross

```

Contributions
-------------

[](#contributions)

Contributions are welcomed. Please be kind, both in reviewing and contributing. Follow the project goals. And include tests.

Alternatives
------------

[](#alternatives)

- [neatlife/php-h3](https://github.com/neatlife/php-h3)

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance53

Moderate activity, may be stable

Popularity35

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Total

3

Last Release

1380d ago

Major Versions

1.0.0 → 2.0.02021-03-05

PHP version history (2 changes)1.0.0PHP ^7.4

2.1.0PHP ^7.4 | ^8.0

### Community

Maintainers

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

---

Top Contributors

[![michaellindahl](https://avatars.githubusercontent.com/u/692663?v=4)](https://github.com/michaellindahl "michaellindahl (34 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/michaellindahl-php-h3/health.svg)

```
[![Health](https://phpackages.com/badges/michaellindahl-php-h3/health.svg)](https://phpackages.com/packages/michaellindahl-php-h3)
```

###  Alternatives

[spatie/tax-calculator

A set of interfaces and methods to clean up your application's tax calculations

8036.2k](/packages/spatie-tax-calculator)

PHPackages © 2026

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