<?php
function getTotal($price, $rate = 1.1, $amount)
{
return $price * $amount * $rate;
}
echo getTotal(100, 10) . PHP_EOL;
echo getTotal(150, 20) . PHP_EOL;
echo getTotal(200, 30) . PHP_EOL;
echo getTotal(120, 40, 1.08) . PHP_EOL;
<?php
function getTotal($price, $rate = 1.1, $amount)
{
return $price * $amount * $rate;
}
echo getTotal(100, 10) . PHP_EOL;
echo getTotal(150, 20) . PHP_EOL;
echo getTotal(200, 30) . PHP_EOL;
echo getTotal(120, 40, 1.08) . PHP_EOL;