← Back to Packages

Package

Haversine

PHP

Calculate great-circle distance between two geographic coordinates.

Overview

PHP 8.1+ utility library that provides a lightweight method to calculate the great-circle distance between two latitude/longitude points using the Haversine formula. Returns distance in kilometers.

Installation

composer require labrodev/haversine

Tips

  • Static method: Calculator::haversineDistance(lat1, lon1, lat2, lon2).
View on GitHub →

Stay Updated

Join the mailing list for technical discourse, architectural logs, and research notes. No spam, ever.