3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $lat1=32.435355; $lng1=45.2894835; $lat2=32.434355; $lng2=45.2894835; $R = 6371000; $dLat = deg2rad($lat2-$lat1); $dLon = deg2rad($lng2-$lng1); $a = sin($dLat/2) *sin($dLat/2) + cos(deg2rad($lat1)) *cos(deg2rad($lat2)) *sin($dLon/2) *sin($dLon/2); $c = 2 * atan2(sqrt($a), sqrt(1-$a)); $d = $R * $c; echo $d; return $d; ?>
based on dcMbi
Output for 4.3.0 - 7.2.0
111.19492664509