Distance helps you calculate the distance between GPS coordinates, in vanilla PHP. Pure and simple.
When using Composer you can always load in the latest version.
{
"require": {
"ldebrouwer/distance": "^1.0"
}
}Check it out on Packagist.
$distance = new Distance()
->setFormula(Formula::HAVERSINE)
->setUnit(Unit::KILOMETRES)
->between(37.331741, -122.030333, 37.422546, -122.084250);- Expanded unit support.
- Documentation.