function func_top_get_cost($price, $tax) {
function nested_func_calc_tax($price, $tax) {
return ($price * $tax) / 100;
}
$total = $price + nested_func_calc_tax($price, $tax);
return round($total, 2);
}
echo func_top_get_cost(17.50, 5) . "<br />";
echo nested_func_calc_tax(17.50, 5);
/*
run:
18.38
0.875
*/