include_once can load a calculation helper exactly once.

Include Once Calculation

require_once_function.php
<?php
$side = ;
include_once __DIR__ . "/area_helper.inc";
include_once __DIR__ . "/area_helper.inc";

echo "side=" . $side . "\n";
echo "area=" . $area . "\n";
<?php
$side = ;
include_once __DIR__ . "/area_helper.inc";
include_once __DIR__ . "/area_helper.inc";

echo "side=" . $side . "\n";
echo "area=" . $area . "\n";
<?php
$side = ;
include_once __DIR__ . "/area_helper.inc";
include_once __DIR__ . "/area_helper.inc";

echo "side=" . $side . "\n";
echo "area=" . $area . "\n";
shared calculation A helper file can use a value from the main file and prepare a scalar result.