3v4l.org

run code in 300+ PHP versions simultaneously
<?php $initialCredit = 40000; $monthlyPayment = 5000; $creditInterestPercent = 3; $commission = 1000; $remainingCredit = $initialCredit; $paid = 0; $monthCount = 0; $creditInterest = $remainingCredit / 100 * $creditInterestPercent; $creditIncrease = $creditInterest + $commission; if ($creditIncrease >= $monthlyPayment) { echo 'Кредит выплатить невозможно. Обслуживание выше ежемесячной платы.'; return; } while ($remainingCredit > 0) { $creditInterest = $remainingCredit / 100 * $creditInterestPercent; $creditIncrease = $creditInterest + $commission; $remainingCredit += $creditIncrease; $payment = min($remainingCredit, $monthlyPayment); $remainingCredit -= $payment; $paid += $payment; $monthCount++; } echo 'Время выплаты: ' . $monthCount . ' месяцев, сумма выплаты: ' . ceil($paid);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 17
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 17
Branch analysis from position: 33
Branch analysis from position: 17
filename:       /in/85eBi
function name:  (null)
number of ops:  41
compiled vars:  !0 = $initialCredit, !1 = $monthlyPayment, !2 = $creditInterestPercent, !3 = $commission, !4 = $remainingCredit, !5 = $paid, !6 = $monthCount, !7 = $creditInterest, !8 = $creditIncrease, !9 = $payment
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 40000
    4     1        ASSIGN                                                   !1, 5000
    5     2        ASSIGN                                                   !2, 3
    6     3        ASSIGN                                                   !3, 1000
    8     4        ASSIGN                                                   !4, !0
    9     5        ASSIGN                                                   !5, 0
   10     6        ASSIGN                                                   !6, 0
   12     7        DIV                                              ~17     !4, 100
          8        MUL                                              ~18     !2, ~17
          9        ASSIGN                                                   !7, ~18
   13    10        ADD                                              ~20     !7, !3
         11        ASSIGN                                                   !8, ~20
   15    12        IS_SMALLER_OR_EQUAL                                      !1, !8
         13      > JMPZ                                                     ~22, ->16
   16    14    >   ECHO                                                     '%D0%9A%D1%80%D0%B5%D0%B4%D0%B8%D1%82+%D0%B2%D1%8B%D0%BF%D0%BB%D0%B0%D1%82%D0%B8%D1%82%D1%8C+%D0%BD%D0%B5%D0%B2%D0%BE%D0%B7%D0%BC%D0%BE%D0%B6%D0%BD%D0%BE.+%D0%9E%D0%B1%D1%81%D0%BB%D1%83%D0%B6%D0%B8%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5+%D0%B2%D1%8B%D1%88%D0%B5+%D0%B5%D0%B6%D0%B5%D0%BC%D0%B5%D1%81%D1%8F%D1%87%D0%BD%D0%BE%D0%B9+%D0%BF%D0%BB%D0%B0%D1%82%D1%8B.'
   18    15      > RETURN                                                   null
   21    16    > > JMP                                                      ->31
   22    17    >   DIV                                              ~23     !4, 100
         18        MUL                                              ~24     !2, ~23
         19        ASSIGN                                                   !7, ~24
   23    20        ADD                                              ~26     !7, !3
         21        ASSIGN                                                   !8, ~26
   25    22        ASSIGN_OP                                     1          !4, !8
   26    23        INIT_FCALL                                               'min'
         24        SEND_VAR                                                 !4
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $29     
         27        ASSIGN                                                   !9, $29
   27    28        ASSIGN_OP                                     2          !4, !9
   29    29        ASSIGN_OP                                     1          !5, !9
   30    30        PRE_INC                                                  !6
   21    31    >   IS_SMALLER                                               0, !4
         32      > JMPNZ                                                    ~34, ->17
   33    33    >   CONCAT                                           ~35     '%D0%92%D1%80%D0%B5%D0%BC%D1%8F+%D0%B2%D1%8B%D0%BF%D0%BB%D0%B0%D1%82%D1%8B%3A+', !6
         34        CONCAT                                           ~36     ~35, '+%D0%BC%D0%B5%D1%81%D1%8F%D1%86%D0%B5%D0%B2%2C+%D1%81%D1%83%D0%BC%D0%BC%D0%B0+%D0%B2%D1%8B%D0%BF%D0%BB%D0%B0%D1%82%D1%8B%3A+'
         35        INIT_FCALL                                               'ceil'
         36        SEND_VAR                                                 !5
         37        DO_ICALL                                         $37     
         38        CONCAT                                           ~38     ~36, $37
         39        ECHO                                                     ~38
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.07 ms | 1004 KiB | 15 Q