PHP code example of artyom-e / unit-converter
1. Go to this page and download the library: Download artyom-e/unit-converter 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/ */
artyom-e / unit-converter example snippets
use ArtyomE\UnitConverter\Converters\Temperature\CelsiusConverter;
$converter = new CelsiusConverter(10);
$converter->toFahrenheit(); //50.0
$converter->toKelvin(); //283.15
$converter->toRankine(); //509.67