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);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 8
Branch analysis from position: 28
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 = 28, Position 2 = 8
Branch analysis from position: 28
Branch analysis from position: 8
filename:       /in/0Rv5i
function name:  (null)
number of ops:  36
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                                                      ->26
   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        INIT_FCALL                                               'min'
         19        SEND_VAR                                                 !4
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $24     
         22        ASSIGN                                                   !9, $24
   24    23        ASSIGN_OP                                     2          !4, !9
   26    24        ASSIGN_OP                                     1          !5, !9
   27    25        PRE_INC                                                  !6
   12    26    >   IS_SMALLER                                               0, !4
         27      > JMPNZ                                                    ~29, ->8
   30    28    >   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
         29        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+'
         30        INIT_FCALL                                               'ceil'
         31        SEND_VAR                                                 !5
         32        DO_ICALL                                         $32     
         33        CONCAT                                           ~33     ~31, $32
         34        ECHO                                                     ~33
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.66 ms | 1004 KiB | 15 Q