Loading repository data…
Loading repository data…
isfonzar / repository
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.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
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 isfonzar\TDEECalculator\TDEECalculator;
$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 isfonzar\TDEECalculator\LBMCalculator;
$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)