PHP code example of ldebrouwer / distance
1. Go to this page and download the library: Download ldebrouwer/distance library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ldebrouwer / distance example snippets
$distance = new Distance()
->setFormula(Formula::HAVERSINE)
->setUnit(Unit::KILOMETRES)
->between(37.331741, -122.030333, 37.422546, -122.084250);