3v4l.org

run code in 300+ PHP versions simultaneously
<?php $initialCredit = 40000; $monthlyPayment = 5000; $creditInterestPercent = 3; $commission = 1000; $remainingCredit = $initialCredit; $paid = 0; $monthCount = 0; while ($remainingCredit > 0) { $creditInterest = $remainingCredit / 100 * $creditInterestPercent; $creditIncrease = $creditInterest + $commission; if ($creditIncrease >= $monthlyPayment) { echo 'Кредит выплатить невозможно. Обслуживание выше ежемесячной платы.'; return; } $remainingCredit += $creditIncrease; $payment = min($remainingCredit, $monthlyPayment); $remainingCredit -= $payment; $paid += $payment; $monthCount++; } echo 'Время выплаты: ' . $monthCount . ' месяцев, сумма выплаты: ' . ceil($paid);
Output for git.master, git.master_jit, rfc.property-hooks
Время выплаты: 13 месяцев, сумма выплаты: 61271

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
48.48 ms | 405 KiB | 5 Q