3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = "2016/6"; $rate = "2.90"; $summer = 7; $winter = 1; $bonus = 100000; $count = 180; $amount = 6070000; //料率 計算用 $calc_rate = $rate / 100; # ボーナス回数 $bcount = getBonusCount($date, $count, $summer, $winter); // ボーナス月テーブルの配列取得用 $bonusPattern = getBonusMonthPattern($summer, $winter); //【1】BE33 ボーナス支払残高 // = IF(★ボーナス加算希望額=0, 0, IF(【1-1】="均等", 【1-2】, IF("ボーナス月回数=奇数", 【1-3】, 【1-4】))) $bike_bonus_repay = getBikeBonusRepay($bonus, $bonusPattern, $date, $rate, $summer, $winter, $bcount); echo $bike_bonus_repay . "\r\n"; echo $amount . "\r\n"; $bike_monthly_repay = round(pmt($calc_rate, $count, $amount - $bike_bonus_repay), 0, PHP_ROUND_HALF_DOWN); echo $bike_monthly_repay; function pmt($rate, $count, $amount) { $count = $count; //支払回数 $rate = $rate / 12; //月利(%) $amount = $rate * -$amount * pow((1 + $rate), $count) / (1 - pow((1 + $rate), $count)); // return $amount; } function getBonusMonthPattern($summer, $winter) { return $summer . "-" . $winter; } /** *【1-1】AT21 間隔数利率 計算用値 均等 ot 不均等 * = VLOOKUP(★ボーナス加算月, [ボ月テーブル], 7, FALSE) */ function get1_1($pattern) { $a_table = array( "6-12" => 1, //"均等", "7-1" => 1, //"均等", "8-2" => 0, //"不均等", "7-12" => 0, //"不均等", "8-1" => 0, //"不均等", ); return $a_table[$pattern]; } /** *【1】BE33 ボーナス支払残高 * = IF(★ボーナス加算希望額=0, 0, IF(【1-1】="均等", 【1-2】, IF("ボーナス月回数=奇数", 【1-3】, 【1-4】))) */ function getBikeBonusRepay($bonus, $pattern, $date, $rate, $summer, $winter, $bcount) { $repay = 0; if(0 == $bonus) { return $repay; } if(1 == get1_1($pattern)) { // *【1-2】BE16 ①ボーナス返済間隔均等 // * = +ROUNDUP(★ボーナス加算希望額 / 【1-2-1】, 0) $repay = round($bonus / get1_2_1($date, $rate, $summer, $winter, $bcount), 0); } else { if(0 > $bcount % 2) { //支払回数 奇数 $repay = get1_3($date, $rate, $summer, $winter, $bonus, $bcount); } else { //支払回数 偶数 $repay = get1_4($date, $rate, $summer, $winter, $bonus, $bcount); } } return $repay; } function get1_4($date, $rate, $summer, $winter, $bonus, $bcount) { //【1-3-1-1-1】AQ11 「初回利率」(少数12桁) $b_first_rate = getFirstRate($date, $rate, $summer, $winter); //【1-3-1-1-2】AP4 「月利」(少数12桁) $b_month_rate = getMonthlyRate($rate); //【1-3-1-1-4】AV18 ボーナス月と支払開始月からとりだす計算用の数値 //【1-3-1-1-3】AW18  list($keyNumber1, $keyNumber2) = getKeyNumbers($date, $summer); // *【1-4-1-1】AP18 「賦金率分子」 $b_inst_numerator = (1 + $b_first_rate) * pow((1 + $b_month_rate * $keyNumber2), ($bcount / 2)) * pow((1 + $b_month_rate * $keyNumber1), ($bcount/ 2 - 1)) * ((1 + $b_month_rate * $keyNumber2) * (1 + $b_month_rate * $keyNumber1) - 1); // *【1-4-1-2】AP19 「賦金率分母」 $b_inst_denominator = (1 + (1 + $b_month_rate * $keyNumber2)) * (pow((1 + $b_month_rate * $keyNumber2), ($bcount / 2)) * pow((1 + $b_month_rate * $keyNumber1), ($bcount / 2)) - 1); // *【1-4-1】BE19  // * = +ROUNDDOWN(【1-4-1-1】/【1-4-1-2】, 12) $b_result = round($b_inst_numerator / $b_inst_denominator, 12, PHP_ROUND_HALF_DOWN); //【1-4】BE20 ②ボーナス不均・偶数 // = +ROUNDUP(★ボーナス加算希望額 / 【1-4-1】, 0) return round($bonus / $b_result, 0, PHP_ROUND_HALF_UP); } /** *【1-3-1-1-4】AV18 ボーナス月と支払開始月からとりだす計算用の数値 * = +IF(ボーナス月1 = 8, VLOOKUP(★開始月, "1~12", 2, 0), VLOOKUP(★開始月, "5 or 7", 3, 0)) * $keyNumber1 * *【1-3-1-1-3】AW18  * = +IF(【1-3-1-1-4】 = 5, 7, 5) * $keyNumber2 */ function getKeyNumbers($date, $summer) { $t_date = explode("/", $date); $month = $t_date[1]; if(8 == $summer) { $a_bonusMonthArray = array( 1 => 7, 2 => 7, 3 => 7, 4 => 7, 5 => 7, 6 => 7, 7 => 7, 8 => 5, 9 => 5, 10 => 5, 11 => 5, 12 => 5); } else { $a_bonusMonthArray = array( 1 => 5, 2 => 7, 3 => 7, 4 => 7, 5 => 7, 6 => 7, 7 => 7, 8 => 7, 9 => 5, 10 => 5, 11 => 5, 12 => 5); } $keyNumber1 = $a_bonusMonthArray[$month]; // ??? if(5 == $keyNumber1) { $keyNumber2 = 7; } else { $keyNumber2 = 5; } return array($keyNumber1, $keyNumber2); } /** *【1-3-1-1-2】AP4 「月利」(少数12桁) * = ROUND(★手数料率(年利) / 12, 12) */ function getMonthlyRate($rate) { return round($rate / 12, 12); } function getFirstRate($date, $rate, $summer, $winter) { //【1-2-1-2】AP11 「初回利率」(少数5桁) // = +ROUNDDOWN(★手数料率(年利) * 【1-2-1-2-1】 / 12, 5) // 【1-2-1-2-1】AP10 「初回期間」※支払開始後、最初のボーナス月までのヶ月 $t_date = explode("/", $date); $month = $t_date[1]; $monthCount = 0; while($monthCount < 12) { $monthCount++; $check = $month + $monthCount; if($check > 12) { $check = $check - 12; } if($check == $summer || $check == $winter) { $monthCount++; break; } } return round($rate * $monthCount / 12, 12, PHP_ROUND_HALF_DOWN); } function getBonusCount($date, $count = NULL, $summer = NULL, $winter = NULL) { # 月 $t_date = explode("/", $date); # 支払回数未設定 if (!$count) { return 0; } # ボーナス月未設定 if (!$summer && !$winter) { return 0; } # ボーナス回数 $bcount = 0; if (12 > $count) { $i = $t_date[1]; $j = $i + $count; $k = 0; $l = 0; for ($k = $i; $k < $j; $k ++) { $l = $k > 12 ? $k - 12 : $k; if ($summer == $l) { $bcount ++; } if ($winter == $l) { $bcount ++; } } } else { # 年2回 if ($summer && $winter) { $bcount = $count / 6; } # 年1回 else { $bcount = $count / 12; } } return $bcount; } /** *【1-2-1】data!AP15 「賦金率」 * = +ROUNDDOWN(【1-2-1-1】 * (1 + 【1-2-1-2】) * 【1-2-1-3】 / (【1-2-1-4】 - 1), 12) * */ function get1_2_1($date, $rate, $summer, $winter, $bcount) { //【1-2-1-1】AP7 「ボーナス利率」 // = +ROUNDDOWN(★手数料率(年利) * 6 / 12, 5) $b_rate = round($rate * 6 / 12, 5, PHP_ROUND_HALF_DOWN); //【1-2-1-2】AP11 「初回利率」(少数5桁) $b_first_rate = getFirstRate($date, $rate, $summer, $winter); //【1-2-1-3】AP8 「間隔数利率」 // = ROUNDDOWN((1 + 【1-2-1-1】)^(【1-0-1】-1),12) $b_interval_rate = round(pow((1 + $b_rate), ($bcount - 1)), 12, PHP_ROUND_HALF_DOWN); //【1-2-1-4】AP9 「回数利率」 // = ROUNDDOWN((1 + 【1-2-1-1】)^(【1-0-1】),12) $b_count_rate = round(pow(1 + $b_rate, $bcount), 12, PHP_ROUND_HALF_DOWN); //= +ROUNDDOWN(【1-2-1-1】 * (1 + 【1-2-1-2】) * 【1-2-1-3】 / (【1-2-1-4】 - 1), 12) $b_inst_rate = round($b_rate * (1 + $b_first_rate) * $b_interval_rate / ($b_count_rate - 1), 12, PHP_ROUND_HALF_DOWN); return $b_inst_rate; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pNUch
function name:  (null)
number of ops:  49
compiled vars:  !0 = $date, !1 = $rate, !2 = $summer, !3 = $winter, !4 = $bonus, !5 = $count, !6 = $amount, !7 = $calc_rate, !8 = $bcount, !9 = $bonusPattern, !10 = $bike_bonus_repay, !11 = $bike_monthly_repay
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '2016%2F6'
    4     1        ASSIGN                                                   !1, '2.90'
    5     2        ASSIGN                                                   !2, 7
    6     3        ASSIGN                                                   !3, 1
    7     4        ASSIGN                                                   !4, 100000
    8     5        ASSIGN                                                   !5, 180
    9     6        ASSIGN                                                   !6, 6070000
   12     7        DIV                                              ~19     !1, 100
          8        ASSIGN                                                   !7, ~19
   15     9        INIT_FCALL_BY_NAME                                       'getBonusCount'
         10        SEND_VAR_EX                                              !0
         11        SEND_VAR_EX                                              !5
         12        SEND_VAR_EX                                              !2
         13        SEND_VAR_EX                                              !3
         14        DO_FCALL                                      0  $21     
         15        ASSIGN                                                   !8, $21
   18    16        INIT_FCALL_BY_NAME                                       'getBonusMonthPattern'
         17        SEND_VAR_EX                                              !2
         18        SEND_VAR_EX                                              !3
         19        DO_FCALL                                      0  $23     
         20        ASSIGN                                                   !9, $23
   22    21        INIT_FCALL_BY_NAME                                       'getBikeBonusRepay'
         22        SEND_VAR_EX                                              !4
         23        SEND_VAR_EX                                              !9
         24        SEND_VAR_EX                                              !0
         25        SEND_VAR_EX                                              !1
         26        SEND_VAR_EX                                              !2
         27        SEND_VAR_EX                                              !3
         28        SEND_VAR_EX                                              !8
         29        DO_FCALL                                      0  $25     
         30        ASSIGN                                                   !10, $25
   25    31        CONCAT                                           ~27     !10, '%0D%0A'
         32        ECHO                                                     ~27
   26    33        CONCAT                                           ~28     !6, '%0D%0A'
         34        ECHO                                                     ~28
   28    35        INIT_FCALL                                               'round'
         36        INIT_FCALL_BY_NAME                                       'pmt'
         37        SEND_VAR_EX                                              !7
         38        SEND_VAR_EX                                              !5
         39        SUB                                              ~29     !6, !10
         40        SEND_VAL_EX                                              ~29
         41        DO_FCALL                                      0  $30     
         42        SEND_VAR                                                 $30
         43        SEND_VAL                                                 0
         44        SEND_VAL                                                 2
         45        DO_ICALL                                         $31     
         46        ASSIGN                                                   !11, $31
   30    47        ECHO                                                     !11
  265    48      > RETURN                                                   1

Function pmt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pNUch
function name:  pmt
number of ops:  24
compiled vars:  !0 = $rate, !1 = $count, !2 = $amount
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   33     3        ASSIGN                                                   !1, !1
   34     4        DIV                                              ~4      !0, 12
          5        ASSIGN                                                   !0, ~4
   35     6        MUL                                              ~6      !2, -1
          7        MUL                                              ~7      !0, ~6
          8        INIT_FCALL                                               'pow'
          9        ADD                                              ~8      1, !0
         10        SEND_VAL                                                 ~8
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $9      
         13        MUL                                              ~10     $9, ~7
         14        INIT_FCALL                                               'pow'
         15        ADD                                              ~11     1, !0
         16        SEND_VAL                                                 ~11
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $12     
         19        SUB                                              ~13     1, $12
         20        DIV                                              ~14     ~10, ~13
         21        ASSIGN                                                   !2, ~14
   36    22      > RETURN                                                   !2
   37    23*     > RETURN                                                   null

End of function pmt

Function getbonusmonthpattern:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pNUch
function name:  getBonusMonthPattern
number of ops:  6
compiled vars:  !0 = $summer, !1 = $winter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   40     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   41     2        CONCAT                                           ~2      !0, '-'
          3        CONCAT                                           ~3      ~2, !1
          4      > RETURN                                                   ~3
   42     5*     > RETURN                                                   null

End of function getbonusmonthpattern

Function get1_1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pNUch
function name:  get1_1
number of ops:  5
compiled vars:  !0 = $pattern, !1 = $a_table
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   48     0  E >   RECV                                             !0      
   49     1        ASSIGN                                                   !1, <array>
   56     2        FETCH_DIM_R                                      ~3      !1, !0
          3      > RETURN                                                   ~3
   57     4*     > RETURN                                                   null

End of function get1_1

Function getbikebonusrepay:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 30
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 43
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pNUch
function name:  getBikeBonusRepay
number of ops:  54
compiled vars:  !0 = $bonus, !1 = $pattern, !2 = $date, !3 = $rate, !4 = $summer, !5 = $winter, !6 = $bcount, !7 = $repay
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   65     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV                                             !4      
          5        RECV                                             !5      
          6        RECV                                             !6      
   67     7        ASSIGN                                                   !7, 0
   69     8        IS_EQUAL                                                 !0, 0
          9      > JMPZ                                                     ~9, ->11
   70    10    > > RETURN                                                   !7
   73    11    >   INIT_FCALL                                               'get1_1'
         12        SEND_VAR                                                 !1
         13        DO_FCALL                                      0  $10     
         14        IS_EQUAL                                                 $10, 1
         15      > JMPZ                                                     ~11, ->30
   76    16    >   INIT_FCALL                                               'round'
         17        INIT_FCALL_BY_NAME                                       'get1_2_1'
         18        SEND_VAR_EX                                              !2
         19        SEND_VAR_EX                                              !3
         20        SEND_VAR_EX                                              !4
         21        SEND_VAR_EX                                              !5
         22        SEND_VAR_EX                                              !6
         23        DO_FCALL                                      0  $12     
         24        DIV                                              ~13     !0, $12
         25        SEND_VAL                                                 ~13
         26        SEND_VAL                                                 0
         27        DO_ICALL                                         $14     
         28        ASSIGN                                                   !7, $14
         29      > JMP                                                      ->52
   79    30    >   MOD                                              ~16     !6, 2
         31        IS_SMALLER                                               ~16, 0
         32      > JMPZ                                                     ~17, ->43
   80    33    >   INIT_FCALL_BY_NAME                                       'get1_3'
         34        SEND_VAR_EX                                              !2
         35        SEND_VAR_EX                                              !3
         36        SEND_VAR_EX                                              !4
         37        SEND_VAR_EX                                              !5
         38        SEND_VAR_EX                                              !0
         39        SEND_VAR_EX                                              !6
         40        DO_FCALL                                      0  $18     
         41        ASSIGN                                                   !7, $18
         42      > JMP                                                      ->52
   82    43    >   INIT_FCALL_BY_NAME                                       'get1_4'
         44        SEND_VAR_EX                                              !2
         45        SEND_VAR_EX                                              !3
         46        SEND_VAR_EX                                              !4
         47        SEND_VAR_EX                                              !5
         48        SEND_VAR_EX                                              !0
         49        SEND_VAR_EX                                              !6
         50        DO_FCALL                                      0  $20     
         51        ASSIGN                                                   !7, $20
   86    52    > > RETURN                                                   !7
   87    53*     > RETURN                                                   null

End of function getbikebonusrepay

Function get1_4:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pNUch
function name:  get1_4
number of ops:  88
compiled vars:  !0 = $date, !1 = $rate, !2 = $summer, !3 = $winter, !4 = $bonus, !5 = $bcount, !6 = $b_first_rate, !7 = $b_month_rate, !8 = $keyNumber1, !9 = $keyNumber2, !10 = $b_inst_numerator, !11 = $b_inst_denominator, !12 = $b_result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   91     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV                                             !4      
          5        RECV                                             !5      
   94     6        INIT_FCALL_BY_NAME                                       'getFirstRate'
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !1
          9        SEND_VAR_EX                                              !2
         10        SEND_VAR_EX                                              !3
         11        DO_FCALL                                      0  $13     
         12        ASSIGN                                                   !6, $13
   97    13        INIT_FCALL_BY_NAME                                       'getMonthlyRate'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0  $15     
         16        ASSIGN                                                   !7, $15
  101    17        INIT_FCALL_BY_NAME                                       'getKeyNumbers'
         18        SEND_VAR_EX                                              !0
         19        SEND_VAR_EX                                              !2
         20        DO_FCALL                                      0  $17     
         21        FETCH_LIST_R                                     $18     $17, 0
         22        ASSIGN                                                   !8, $18
         23        FETCH_LIST_R                                     $20     $17, 1
         24        ASSIGN                                                   !9, $20
         25        FREE                                                     $17
  104    26        ADD                                              ~22     1, !6
         27        INIT_FCALL                                               'pow'
         28        MUL                                              ~23     !7, !9
         29        ADD                                              ~24     1, ~23
         30        SEND_VAL                                                 ~24
         31        DIV                                              ~25     !5, 2
         32        SEND_VAL                                                 ~25
         33        DO_ICALL                                         $26     
         34        MUL                                              ~27     $26, ~22
         35        INIT_FCALL                                               'pow'
         36        MUL                                              ~28     !7, !8
         37        ADD                                              ~29     1, ~28
         38        SEND_VAL                                                 ~29
         39        DIV                                              ~30     !5, 2
         40        SUB                                              ~31     ~30, 1
         41        SEND_VAL                                                 ~31
         42        DO_ICALL                                         $32     
         43        MUL                                              ~33     $32, ~27
         44        MUL                                              ~34     !7, !9
         45        ADD                                              ~35     1, ~34
         46        MUL                                              ~36     !7, !8
         47        ADD                                              ~37     1, ~36
         48        MUL                                              ~38     ~35, ~37
         49        SUB                                              ~39     ~38, 1
         50        MUL                                              ~40     ~33, ~39
         51        ASSIGN                                                   !10, ~40
  107    52        MUL                                              ~42     !7, !9
         53        ADD                                              ~43     1, ~42
         54        ADD                                              ~44     1, ~43
         55        INIT_FCALL                                               'pow'
         56        MUL                                              ~45     !7, !9
         57        ADD                                              ~46     1, ~45
         58        SEND_VAL                                                 ~46
         59        DIV                                              ~47     !5, 2
         60        SEND_VAL                                                 ~47
         61        DO_ICALL                                         $48     
         62        INIT_FCALL                                               'pow'
         63        MUL                                              ~49     !7, !8
         64        ADD                                              ~50     1, ~49
         65        SEND_VAL                                                 ~50
         66        DIV                                              ~51     !5, 2
         67        SEND_VAL                                                 ~51
         68        DO_ICALL                                         $52     
         69        MUL                                              ~53     $48, $52
         70        SUB                                              ~54     ~53, 1
         71        MUL                                              ~55     ~44, ~54
         72        ASSIGN                                                   !11, ~55
  111    73        INIT_FCALL                                               'round'
         74        DIV                                              ~57     !10, !11
         75        SEND_VAL                                                 ~57
         76        SEND_VAL                                                 12
         77        SEND_VAL                                                 2
         78        DO_ICALL                                         $58     
         79        ASSIGN                                                   !12, $58
  115    80        INIT_FCALL                                               'round'
         81        DIV                                              ~60     !4, !12
         82        SEND_VAL                                                 ~60
         83        SEND_VAL                                                 0
         84        SEND_VAL                                                 1
         85        DO_ICALL                                         $61     
         86      > RETURN                                                   $61
  117    87*     > RETURN                                                   null

End of function get1_4

Function getkeynumbers:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
Branch analysis from position: 20
filename:       /in/pNUch
function name:  getKeyNumbers
number of ops:  25
compiled vars:  !0 = $date, !1 = $summer, !2 = $t_date, !3 = $month, !4 = $a_bonusMonthArray, !5 = $keyNumber1, !6 = $keyNumber2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  132     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  133     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%2F'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !2, $7
  134     7        FETCH_DIM_R                                      ~9      !2, 1
          8        ASSIGN                                                   !3, ~9
  135     9        IS_EQUAL                                                 !1, 8
         10      > JMPZ                                                     ~11, ->13
  136    11    >   ASSIGN                                                   !4, <array>
         12      > JMP                                                      ->14
  138    13    >   ASSIGN                                                   !4, <array>
  140    14    >   FETCH_DIM_R                                      ~14     !4, !3
         15        ASSIGN                                                   !5, ~14
  143    16        IS_EQUAL                                                 !5, 5
         17      > JMPZ                                                     ~16, ->20
  144    18    >   ASSIGN                                                   !6, 7
         19      > JMP                                                      ->21
  146    20    >   ASSIGN                                                   !6, 5
  149    21    >   INIT_ARRAY                                       ~19     !5
         22        ADD_ARRAY_ELEMENT                                ~19     !6
         23      > RETURN                                                   ~19
  151    24*     > RETURN                                                   null

End of function getkeynumbers

Function getmonthlyrate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pNUch
function name:  getMonthlyRate
number of ops:  8
compiled vars:  !0 = $rate
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  157     0  E >   RECV                                             !0      
  158     1        INIT_FCALL                                               'round'
          2        DIV                                              ~1      !0, 12
          3        SEND_VAL                                                 ~1
          4        SEND_VAL                                                 12
          5        DO_ICALL                                         $2      
          6      > RETURN                                                   $2
  159     7*     > RETURN                                                   null

End of function getmonthlyrate

Function getfirstrate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 13
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
2 jumps found. (Code = 47) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 27
Branch analysis from position: 24
Branch analysis from position: 20
filename:       /in/pNUch
function name:  getFirstRate
number of ops:  38
compiled vars:  !0 = $date, !1 = $rate, !2 = $summer, !3 = $winter, !4 = $t_date, !5 = $month, !6 = $monthCount, !7 = $check
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  161     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
  166     4        INIT_FCALL                                               'explode'
          5        SEND_VAL                                                 '%2F'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !4, $8
  167     9        FETCH_DIM_R                                      ~10     !4, 1
         10        ASSIGN                                                   !5, ~10
  169    11        ASSIGN                                                   !6, 0
  170    12      > JMP                                                      ->27
  172    13    >   PRE_INC                                                  !6
  173    14        ADD                                              ~14     !5, !6
         15        ASSIGN                                                   !7, ~14
  175    16        IS_SMALLER                                               12, !7
         17      > JMPZ                                                     ~16, ->20
  176    18    >   SUB                                              ~17     !7, 12
         19        ASSIGN                                                   !7, ~17
  178    20    >   IS_EQUAL                                         ~19     !7, !2
         21      > JMPNZ_EX                                         ~19     ~19, ->24
         22    >   IS_EQUAL                                         ~20     !7, !3
         23        BOOL                                             ~19     ~20
         24    > > JMPZ                                                     ~19, ->27
  179    25    >   PRE_INC                                                  !6
  180    26      > JMP                                                      ->29
  170    27    >   IS_SMALLER                                               !6, 12
         28      > JMPNZ                                                    ~22, ->13
  185    29    >   INIT_FCALL                                               'round'
         30        MUL                                              ~23     !1, !6
         31        DIV                                              ~24     ~23, 12
         32        SEND_VAL                                                 ~24
         33        SEND_VAL                                                 12
         34        SEND_VAL                                                 2
         35        DO_ICALL                                         $25     
         36      > RETURN                                                   $25
  187    37*     > RETURN                                                   null

End of function getfirstrate

Function getbonuscount:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 46) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 18
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 46
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 29
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 34
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 39
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 42
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 29
Branch analysis from position: 45
Branch analysis from position: 29
Branch analysis from position: 42
Branch analysis from position: 39
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 39
Branch analysis from position: 38
Branch analysis from position: 39
Branch analysis from position: 46
2 jumps found. (Code = 46) Position 1 = 47, Position 2 = 48
Branch analysis from position: 47
2 jumps found. (Code = 43) Position 1 = 49, Position 2 = 52
Branch analysis from position: 49
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
Branch analysis from position: 52
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 48
Branch analysis from position: 16
filename:       /in/pNUch
function name:  getBonusCount
number of ops:  56
compiled vars:  !0 = $date, !1 = $count, !2 = $summer, !3 = $winter, !4 = $t_date, !5 = $bcount, !6 = $i, !7 = $j, !8 = $k, !9 = $l
l

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.45 ms | 1431 KiB | 20 Q