tdee calculator
vity condition
TDEE Calculator is a composer library that calculates how much energy (calories) are burned daily given the weight, height and age or Lean Body Mass.
$ composer require isfonzar/tdee-calculator<?php
require(__DIR__ . '/vendor/autoload.php');
// Calculations based on weight, height and age
use isfonzarTDEECalculatorTDEECalculator;
$tdeeCalculator = new TDEECalculator();
echo $tdeeCalculator->calculate('male', 80, 182, 24);
echo "n";
// ---------------------------------------------------------
// The unit is parametrizable
$options = [
'formula' => 'revised_harris_benedict' // You can select the best formula for your needs
'unit' => 'imperial', // Choose the desired measurement unit
];
$tdeeCalculator = new TDEECalculator($options);
echo $tdeeCalculator->calculate('male', 176, 6, 24);
echo "n";
// Input activity level
echo $tdeeCalculator->calculate('male', 176, 6, 24, 'very_active');
echo "n";
// Calculations based on lean body mass
use isfonzarTDEECalculatorLBMCalculator;
$options = [
'unit' => 'metric',
];
$lbmCalculator = new LBMCalculator($options);
echo $lbmCalculator->calculate(80);
echo "n";Please use the issue tracker to report any bugs or feature requests.
git checkout -b my-new-feature)git commit -am 'Add some feature')git push origin my-new-feature)