PHP code example of kyimyohan / body-mass-index

1. Go to this page and download the library: Download kyimyohan/body-mass-index 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/ */

    

kyimyohan / body-mass-index example snippets


use Kyimyohan\BodyMassIndex\BodyMassIndex;

# returns 'healthy'
$height = 5.2;
$weight = 105
$bmi = BodyMassIndex::calculate($height, $weight)->getResult();
echo $bmi;