1. Go to this page and download the library: Download tigo/units-conversion 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/ */
tigo / units-conversion example snippets
>= 7.2
use Tigo\UnitsConversion\ClientLength; //import class
$client = new ClientLength();
/**
Example: Converting kilometer to meter
$client->convert(kilometer, meter, value)
**/
print_r($client->convert(10, 3, 23)); // result: 23000 (meter)
/**
Example: Converting Yard to Inch
$client->convert(yard, inch, value)
**/
print_r($client->convert(7, 9, 23)); // result: 828 (inch)
Directory: ..\src\Length\StandardUnit.php
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.