kyimyohan / body-mass-index
output: healthy|underweight|overweight|obese input: weight&height
1.0.0
2024-02-18 15:58 UTC
Requires (Dev)
- phpunit/php-code-coverage: ^11.0
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2025-06-19 04:16:47 UTC
README
Body Mass Index is a PHP library that accept height and weight as input and output may be healthy, underweight, overweight, obese.
Height : 5' 2" => 5.2
Weight : 105 lb
Installation
Use the composer to install.
composer require kyimyohan/body-mass-index
Usage
use Kyimyohan\BodyMassIndex\BodyMassIndex; # returns 'healthy' $height = 5.2; $weight = 105 $bmi = BodyMassIndex::calculate($height, $weight)->getResult(); echo $bmi;
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.