<?php

error_reporting(-1);

function deposit($creditSum, $percent, $comission, $onePayment) {
	$realPercents = $percent / 100;
	$finalOnepay = $creditSum + $onePayment;
	$finalMonthly = ($finalOnepay * $realPercents) + $comission;
	return $finalMonthly;
};

$creditSum = 39999;
$payout = 5000;
$homoCreditBank = deposit($creditSum, 4, 500, 0);
$softbankTotal = deposit($creditSum, 3, 1000, 0);
$strawberryBankTotal = deposit($creditSum, 2, 0, 7777);

echo "homoCredit: {$homoCreditBank} rub. \n";
echo "softbank: {$softbankTotal} rub. \n";
echo "strawberryBank: {$strawberryBankTotal} rub. \n";