3v4l.org

run code in 500+ 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);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 8
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 8
Branch analysis from position: 25
Branch analysis from position: 8
filename:       /in/0Rv5i
function name:  (null)
number of ops:  33
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      > JMP                                                          ->23
   13     8    >   DIV                                                  ~17     !4, 100
          9        MUL                                                  ~18     !2, ~17
         10        ASSIGN                                                       !7, ~18
   14    11        ADD                                                  ~20     !7, !3
         12        ASSIGN                                                       !8, ~20
   16    13        IS_SMALLER_OR_EQUAL                                          !1, !8
         14      > JMPZ                                                         ~22, ->17
   17    15    >   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.'
   19    16      > RETURN                                                       null
   22    17    >   ASSIGN_OP                                         1          !4, !8
   23    18        FRAMELESS_ICALL_2                min                 ~24     !4, !1
         19        ASSIGN                                                       !9, ~24
   24    20        ASSIGN_OP                                         2          !4, !9
   26    21        ASSIGN_OP                                         1          !5, !9
   27    22        PRE_INC                                                      !6
   12    23    >   IS_SMALLER                                                   0, !4
         24      > JMPNZ                                                        ~29, ->8
   30    25    >   CONCAT                                               ~30     '%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
         26        CONCAT                                               ~31     ~30, '+%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+'
         27        INIT_FCALL                                                   'ceil'
         28        SEND_VAR                                                     !5
         29        DO_ICALL                                             $32     
         30        CONCAT                                               ~33     ~31, $32
         31        ECHO                                                         ~33
         32      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.29 ms | 1725 KiB | 14 Q