PHP code example of daar / bmi
1. Go to this page and download the library: Download daar/bmi 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/ */
daar / bmi example snippets
use Daar\Bmi\BMI;
// Calculate the BMI
$bmi = BMI::calculate($weight, $length);
// Calculate the BMI category according to the WHO standard
$category = BMI::category($weight, $length, $gender, $ageInMonths);