3v4l.org

run code in 300+ PHP versions simultaneously
<?php $max_parcelas = 10; $arr = []; $range = range(1,$max_parcelas); $inicial = 2000; $cheio = 2900; $dif = $cheio - $inicial; foreach($range as $x) { $log = log($x, $max_parcelas); $val = $cheio + ($log * $dif); $arr[$x] = ['log' => $log, 'valor' => $val]; } print_r($arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 26
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 26
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/PSrgU
function name:  (null)
number of ops:  31
compiled vars:  !0 = $max_parcelas, !1 = $arr, !2 = $range, !3 = $inicial, !4 = $cheio, !5 = $dif, !6 = $x, !7 = $log, !8 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 10
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'range'
          3        SEND_VAL                                                 1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $11     
          6        ASSIGN                                                   !2, $11
    7     7        ASSIGN                                                   !3, 2000
    8     8        ASSIGN                                                   !4, 2900
   10     9        SUB                                              ~15     !4, !3
         10        ASSIGN                                                   !5, ~15
   13    11      > FE_RESET_R                                       $17     !2, ->26
         12    > > FE_FETCH_R                                               $17, !6, ->26
   14    13    >   INIT_FCALL                                               'log'
         14        SEND_VAR                                                 !6
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $18     
         17        ASSIGN                                                   !7, $18
   16    18        MUL                                              ~20     !7, !5
         19        ADD                                              ~21     !4, ~20
         20        ASSIGN                                                   !8, ~21
   18    21        INIT_ARRAY                                       ~24     !7, 'log'
         22        ADD_ARRAY_ELEMENT                                ~24     !8, 'valor'
         23        ASSIGN_DIM                                               !1, !6
         24        OP_DATA                                                  ~24
   13    25      > JMP                                                      ->12
         26    >   FE_FREE                                                  $17
   24    27        INIT_FCALL                                               'print_r'
         28        SEND_VAR                                                 !1
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.23 ms | 1396 KiB | 19 Q