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);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.4.120.0040.00622.45
8.4.110.0120.00422.63
8.4.100.0120.00618.79
8.4.90.0140.00518.83
8.4.80.0140.00618.55
8.4.70.0140.00617.94
8.4.60.0080.00820.75
8.4.50.0120.00218.80
8.4.40.0130.00317.62
8.4.30.0110.00418.77
8.4.20.0070.01119.62
8.4.10.0040.00419.72
8.3.250.0110.00618.97
8.3.240.0060.00417.11
8.3.230.0100.01016.69
8.3.220.0070.01119.08
8.3.210.0080.00718.63
8.3.200.0040.00716.84
8.3.190.0090.00517.10
8.3.180.0110.00816.54
8.3.170.0110.00719.04
8.3.160.0090.00918.48
8.3.150.0060.01519.02
8.3.140.0120.00619.07
8.3.130.0060.00318.44
8.3.120.0110.00718.86
8.3.110.0090.00020.94
8.3.100.0000.00916.63
8.3.90.0050.00318.64
8.3.80.0060.00617.97
8.3.70.0090.00618.38
8.3.60.0140.00016.46
8.3.50.0110.00416.58
8.3.40.0100.00322.07
8.3.30.0090.00419.23
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0110.00426.16
8.2.290.0130.00620.38
8.2.280.0110.00918.59
8.2.270.0040.00417.16
8.2.260.0040.00418.61
8.2.250.0040.00416.72
8.2.240.0060.00318.84
8.2.230.0060.00322.58
8.2.220.0080.00024.06
8.2.210.0070.00026.77
8.2.200.0080.00416.50
8.2.190.0090.00916.61
8.2.180.0040.01118.29
8.2.170.0090.00619.04
8.2.160.0110.00422.96
8.2.150.0040.00425.66
8.2.140.0030.00724.66
8.2.130.0100.00326.16
8.2.120.0040.00419.89
8.2.110.0140.00720.52
8.2.100.0140.00718.89
8.2.90.0040.01818.82
8.2.80.0150.00618.95
8.2.70.0080.00819.08
8.2.60.0030.00618.91
8.2.50.0180.00318.66
8.2.40.0170.00318.82
8.2.30.0130.00718.88
8.2.20.0100.01420.57
8.2.10.0150.00620.70
8.2.00.0070.01420.74
8.1.330.0130.00722.01
8.1.320.0110.00916.07
8.1.310.0030.00618.48
8.1.300.0030.00717.99
8.1.290.0030.00630.84
8.1.280.0030.01425.92
8.1.270.0050.00324.66
8.1.260.0100.00026.35
8.1.250.0080.00028.09
8.1.240.0100.00720.52
8.1.230.0080.01520.25
8.1.220.0180.00320.47
8.1.210.0100.01021.73
8.1.200.0070.01420.26
8.1.190.0070.01720.29
8.1.180.0150.00920.34
8.1.170.0170.00718.54
8.1.160.0160.00618.73
8.1.150.0110.01118.63
8.1.140.0150.00618.48
8.1.130.0040.01818.54
8.1.120.0180.00318.54
8.1.110.0070.01018.51
8.1.100.0140.00718.37
8.1.90.0070.00318.54
8.1.80.0150.00618.55
8.1.70.0130.00318.79
8.1.60.0100.00718.66
8.1.50.0110.01118.67
8.1.40.0090.00019.00
8.1.30.0100.01018.88
8.1.20.0070.00318.69
8.1.10.0070.01018.62
8.1.00.0090.00018.82
8.0.300.0090.00017.81
8.0.290.0060.00617.86
8.0.280.0100.00617.68
8.0.270.0080.00817.81
8.0.260.0060.00317.90
8.0.250.0000.00918.02
8.0.240.0060.00317.96
8.0.230.0060.00317.88
8.0.220.0030.00617.77
8.0.210.0090.00017.96
8.0.200.0000.00917.84
8.0.190.0090.00017.87
8.0.180.0060.00317.75
8.0.170.0060.00317.92
8.0.160.0130.00717.93
8.0.150.0050.00517.94
8.0.140.0060.00317.96
8.0.130.0060.00317.89
8.0.120.0040.01217.89
8.0.110.0120.00918.02
8.0.100.0100.00017.79
8.0.90.0030.01017.70
8.0.80.0090.00017.75
8.0.70.0090.00317.71
8.0.60.0090.00617.87
8.0.50.0060.00317.84
8.0.30.0080.00017.83
8.0.20.0060.00318.08
8.0.10.0100.01017.98

preferences:
31.47 ms | 403 KiB | 5 Q