PHP code example of rickkuilman / awesome-units
1. Go to this page and download the library: Download rickkuilman/awesome-units 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/ */
rickkuilman / awesome-units example snippets
use \RickKuilman\AwesomeUnits\AwesomeUnit;
$coffeeCups = new AwesomeUnit(10)
->liters()
->toCoffeeCups();
echo "10 liters is equal to " . $coffeeCups . " cups of coffee!"
// 10 liters is equal to 40 cups of coffee!