PHP code example of jeffwhansen / distance-conversions
1. Go to this page and download the library: Download jeffwhansen/distance-conversions 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/ */
jeffwhansen / distance-conversions example snippets
Distance::fromMeters("5.55")->to(Format::ENGLISH); //18-2.5
Distance::fromFeet("18-2.5")->to(Format::METRIC); //5.55
Distance::fromFeet("18-2.5")->to("M.C"); //5.55
Distance::fromMeters("5.55")->to("F' I-i\""); //18' 2-1/2"