<?php
error_reporting(-1);

function totalPay($monthPay, $tax, $creditSum, $bankPercent) {
	for($i = 0; $i <= 20; $i++){
		$totalCredit = $creditSum * $bankPercent + $tax - $monthPay;
		$total = 0;
		$total = $total + $monthPay;
		if($totalCredit < $monthPay){
			brea
		}
	}
	return $totalCredit;
}

$homoCredit = totalPay(5000, 500, 39999, 1.04);
$softBank = totalPay(5000, 1000, 39999, 1.03);
$strawberryBank = totalPay(5000, 0, 39999, 1.02);
$strawberryBankTax = $strawberryBank + 7777;

echo "{$homoCredit}\n";
echo "{$softBank}\n";
echo "{$strawberryBank}\n";