3v4l.org

run code in 300+ PHP versions simultaneously
<?php $y=1; $last=0; $bdlat = 0.25 + 0.25 + 0.15; $rtbhs = array("Lieutenant", "F Lieutenant", "Captain", "Major ", "L Colonel", "Colonel", "B General"); $rtbh = 1; $base = 9275; $i=1; $S="\t| "; while (1) { echo $y . $S . $rtbhs[$rtbh] . $S . $i . $S . round(2700+($base*$bdlat)+$base) . $S . round((2700+($base*$bdlat)+$base)-$last) . "\n"; $last = round(2700+($base*$bdlat)+$base); $y++; if ($rtbh == 1) { $base+=440; } else if ($rtbh == 2) { $base+=495; } else if ($rtbh == 3) { $base+=265; } else if ($rtbh == 4) { $base+=470; } else if ($rtbh == 5) { $base+=590; } else if ($rtbh == 6) { $base+=650; } if ($rtbh == 1 && $i == 3) { $i=0; $base = 10600; $rtbh++; } else if ($rtbh == 2 && $i == 6) { $i=0; $base = 13515; $rtbh++; } else if ($rtbh == 3 && $i == 4) { $i=0; $base = 14650; $rtbh++; } else if ($rtbh == 4 && $i == 4) { $i=0; $base = 16520; $rtbh++; } else if ($rtbh == 5 && $i == 4) { $i=0; $base = 18805; $rtbh++; } else if ($rtbh == 6 && $i == 4) { break; } $i++; } echo "-------------------------------------------------\n"; $base = 9000; for ($i=1; $i <=21; $i++) { echo $i . $S . "Engineer" . $S . 0 . $S . round((600+($base*0.25)+$base)*0.91) . $S . round(((600+($base*0.25)+$base)*0.91)-$last) . "\n"; //echo $i . " - " . ((600+($base*0.25)+$base)*0.91) . " - " . (((600+($base*0.25)+$base)*0.91)-$last) . "\n"; $last = round((600+($base*0.25)+$base)*0.91); $y++; $base+=$base*0.06; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 116
Branch analysis from position: 116
2 jumps found. (Code = 44) Position 1 = 117, Position 2 = 9
Branch analysis from position: 117
1 jumps found. (Code = 42) Position 1 = 158
Branch analysis from position: 158
2 jumps found. (Code = 44) Position 1 = 160, Position 2 = 121
Branch analysis from position: 160
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 121
2 jumps found. (Code = 44) Position 1 = 160, Position 2 = 121
Branch analysis from position: 160
Branch analysis from position: 121
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 45
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 64
Branch analysis from position: 64
2 jumps found. (Code = 46) Position 1 = 66, Position 2 = 68
Branch analysis from position: 66
2 jumps found. (Code = 43) Position 1 = 69, Position 2 = 73
Branch analysis from position: 69
1 jumps found. (Code = 42) Position 1 = 115
Branch analysis from position: 115
2 jumps found. (Code = 44) Position 1 = 117, Position 2 = 9
Branch analysis from position: 117
Branch analysis from position: 9
Branch analysis from position: 73
2 jumps found. (Code = 46) Position 1 = 75, Position 2 = 77
Branch analysis from position: 75
2 jumps found. (Code = 43) Position 1 = 78, Position 2 = 82
Branch analysis from position: 78
1 jumps found. (Code = 42) Position 1 = 115
Branch analysis from position: 115
Branch analysis from position: 82
2 jumps found. (Code = 46) Position 1 = 84, Position 2 = 86
Branch analysis from position: 84
2 jumps found. (Code = 43) Position 1 = 87, Position 2 = 91
Branch analysis from position: 87
1 jumps found. (Code = 42) Position 1 = 115
Branch analysis from position: 115
Branch analysis from position: 91
2 jumps found. (Code = 46) Position 1 = 93, Position 2 = 95
Branch analysis from position: 93
2 jumps found. (Code = 43) Position 1 = 96, Position 2 = 100
Branch analysis from position: 96
1 jumps found. (Code = 42) Position 1 = 115
Branch analysis from position: 115
Branch analysis from position: 100
2 jumps found. (Code = 46) Position 1 = 102, Position 2 = 104
Branch analysis from position: 102
2 jumps found. (Code = 43) Position 1 = 105, Position 2 = 109
Branch analysis from position: 105
1 jumps found. (Code = 42) Position 1 = 115
Branch analysis from position: 115
Branch analysis from position: 109
2 jumps found. (Code = 46) Position 1 = 111, Position 2 = 113
Branch analysis from position: 111
2 jumps found. (Code = 43) Position 1 = 114, Position 2 = 115
Branch analysis from position: 114
1 jumps found. (Code = 42) Position 1 = 117
Branch analysis from position: 117
Branch analysis from position: 115
Branch analysis from position: 113
Branch analysis from position: 104
Branch analysis from position: 95
Branch analysis from position: 86
Branch analysis from position: 77
Branch analysis from position: 68
Branch analysis from position: 45
2 jumps found. (Code = 43) Position 1 = 47, Position 2 = 49
Branch analysis from position: 47
1 jumps found. (Code = 42) Position 1 = 64
Branch analysis from position: 64
Branch analysis from position: 49
2 jumps found. (Code = 43) Position 1 = 51, Position 2 = 53
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 64
Branch analysis from position: 64
Branch analysis from position: 53
2 jumps found. (Code = 43) Position 1 = 55, Position 2 = 57
Branch analysis from position: 55
1 jumps found. (Code = 42) Position 1 = 64
Branch analysis from position: 64
Branch analysis from position: 57
2 jumps found. (Code = 43) Position 1 = 59, Position 2 = 61
Branch analysis from position: 59
1 jumps found. (Code = 42) Position 1 = 64
Branch analysis from position: 64
Branch analysis from position: 61
2 jumps found. (Code = 43) Position 1 = 63, Position 2 = 64
Branch analysis from position: 63
2 jumps found. (Code = 46) Position 1 = 66, Position 2 = 68
Branch analysis from position: 66
Branch analysis from position: 68
Branch analysis from position: 64
filename:       /in/UPASr
function name:  (null)
number of ops:  161
compiled vars:  !0 = $y, !1 = $last, !2 = $bdlat, !3 = $rtbhs, !4 = $rtbh, !5 = $base, !6 = $i, !7 = $S
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1
    3     1        ASSIGN                                                   !1, 0
    4     2        ASSIGN                                                   !2, 0.65
    5     3        ASSIGN                                                   !3, <array>
    7     4        ASSIGN                                                   !4, 1
    8     5        ASSIGN                                                   !5, 9275
    9     6        ASSIGN                                                   !6, 1
   10     7        ASSIGN                                                   !7, '%09%7C+'
   11     8      > JMP                                                      ->116
   13     9    >   CONCAT                                           ~16     !0, !7
         10        FETCH_DIM_R                                      ~17     !3, !4
         11        CONCAT                                           ~18     ~16, ~17
         12        CONCAT                                           ~19     ~18, !7
         13        CONCAT                                           ~20     ~19, !6
         14        CONCAT                                           ~21     ~20, !7
         15        INIT_FCALL                                               'round'
         16        MUL                                              ~22     !5, !2
         17        ADD                                              ~23     2700, ~22
         18        ADD                                              ~24     ~23, !5
         19        SEND_VAL                                                 ~24
         20        DO_ICALL                                         $25     
         21        CONCAT                                           ~26     ~21, $25
         22        CONCAT                                           ~27     ~26, !7
         23        INIT_FCALL                                               'round'
         24        MUL                                              ~28     !5, !2
         25        ADD                                              ~29     2700, ~28
         26        ADD                                              ~30     ~29, !5
         27        SUB                                              ~31     ~30, !1
         28        SEND_VAL                                                 ~31
         29        DO_ICALL                                         $32     
         30        CONCAT                                           ~33     ~27, $32
         31        CONCAT                                           ~34     ~33, '%0A'
         32        ECHO                                                     ~34
   14    33        INIT_FCALL                                               'round'
         34        MUL                                              ~35     !5, !2
         35        ADD                                              ~36     2700, ~35
         36        ADD                                              ~37     ~36, !5
         37        SEND_VAL                                                 ~37
         38        DO_ICALL                                         $38     
         39        ASSIGN                                                   !1, $38
   15    40        PRE_INC                                                  !0
   17    41        IS_EQUAL                                                 !4, 1
         42      > JMPZ                                                     ~41, ->45
   19    43    >   ASSIGN_OP                                     1          !5, 440
         44      > JMP                                                      ->64
   21    45    >   IS_EQUAL                                                 !4, 2
         46      > JMPZ                                                     ~43, ->49
   23    47    >   ASSIGN_OP                                     1          !5, 495
         48      > JMP                                                      ->64
   25    49    >   IS_EQUAL                                                 !4, 3
         50      > JMPZ                                                     ~45, ->53
   27    51    >   ASSIGN_OP                                     1          !5, 265
         52      > JMP                                                      ->64
   29    53    >   IS_EQUAL                                                 !4, 4
         54      > JMPZ                                                     ~47, ->57
   31    55    >   ASSIGN_OP                                     1          !5, 470
         56      > JMP                                                      ->64
   33    57    >   IS_EQUAL                                                 !4, 5
         58      > JMPZ                                                     ~49, ->61
   35    59    >   ASSIGN_OP                                     1          !5, 590
         60      > JMP                                                      ->64
   37    61    >   IS_EQUAL                                                 !4, 6
         62      > JMPZ                                                     ~51, ->64
   39    63    >   ASSIGN_OP                                     1          !5, 650
   42    64    >   IS_EQUAL                                         ~53     !4, 1
         65      > JMPZ_EX                                          ~53     ~53, ->68
         66    >   IS_EQUAL                                         ~54     !6, 3
         67        BOOL                                             ~53     ~54
         68    > > JMPZ                                                     ~53, ->73
   44    69    >   ASSIGN                                                   !6, 0
   45    70        ASSIGN                                                   !5, 10600
   46    71        PRE_INC                                                  !4
         72      > JMP                                                      ->115
   48    73    >   IS_EQUAL                                         ~58     !4, 2
         74      > JMPZ_EX                                          ~58     ~58, ->77
         75    >   IS_EQUAL                                         ~59     !6, 6
         76        BOOL                                             ~58     ~59
         77    > > JMPZ                                                     ~58, ->82
   50    78    >   ASSIGN                                                   !6, 0
   51    79        ASSIGN                                                   !5, 13515
   52    80        PRE_INC                                                  !4
         81      > JMP                                                      ->115
   54    82    >   IS_EQUAL                                         ~63     !4, 3
         83      > JMPZ_EX                                          ~63     ~63, ->86
         84    >   IS_EQUAL                                         ~64     !6, 4
         85        BOOL                                             ~63     ~64
         86    > > JMPZ                                                     ~63, ->91
   56    87    >   ASSIGN                                                   !6, 0
   57    88        ASSIGN                                                   !5, 14650
   58    89        PRE_INC                                                  !4
         90      > JMP                                                      ->115
   60    91    >   IS_EQUAL                                         ~68     !4, 4
         92      > JMPZ_EX                                          ~68     ~68, ->95
         93    >   IS_EQUAL                                         ~69     !6, 4
         94        BOOL                                             ~68     ~69
         95    > > JMPZ                                                     ~68, ->100
   62    96    >   ASSIGN                                                   !6, 0
   63    97        ASSIGN                                                   !5, 16520
   64    98        PRE_INC                                                  !4
         99      > JMP                                                      ->115
   66   100    >   IS_EQUAL                                         ~73     !4, 5
        101      > JMPZ_EX                                          ~73     ~73, ->104
        102    >   IS_EQUAL                                         ~74     !6, 4
        103        BOOL                                             ~73     ~74
        104    > > JMPZ                                                     ~73, ->109
   68   105    >   ASSIGN                                                   !6, 0
   69   106        ASSIGN                                                   !5, 18805
   70   107        PRE_INC                                                  !4
        108      > JMP                                                      ->115
   72   109    >   IS_EQUAL                                         ~78     !4, 6
        110      > JMPZ_EX                                          ~78     ~78, ->113
        111    >   IS_EQUAL                                         ~79     !6, 4
        112        BOOL                                             ~78     ~79
        113    > > JMPZ                                                     ~78, ->115
   74   114    > > JMP                                                      ->117
   76   115    >   PRE_INC                                                  !6
   11   116    > > JMPNZ                                                    1, ->9
   79   117    >   ECHO                                                     '-------------------------------------------------%0A'
   81   118        ASSIGN                                                   !5, 9000
   82   119        ASSIGN                                                   !6, 1
        120      > JMP                                                      ->158
   84   121    >   CONCAT                                           ~83     !6, !7
        122        CONCAT                                           ~84     ~83, 'Engineer'
        123        CONCAT                                           ~85     ~84, !7
        124        CONCAT                                           ~86     ~85, '0'
        125        CONCAT                                           ~87     ~86, !7
        126        INIT_FCALL                                               'round'
        127        MUL                                              ~88     !5, 0.25
        128        ADD                                              ~89     600, ~88
        129        ADD                                              ~90     ~89, !5
        130        MUL                                              ~91     ~90, 0.91
        131        SEND_VAL                                                 ~91
        132        DO_ICALL                                         $92     
        133        CONCAT                                           ~93     ~87, $92
        134        CONCAT                                           ~94     ~93, !7
        135        INIT_FCALL                                               'round'
        136        MUL                                              ~95     !5, 0.25
        137        ADD                                              ~96     600, ~95
        138        ADD                                              ~97     ~96, !5
        139        MUL                                              ~98     ~97, 0.91
        140        SUB                                              ~99     ~98, !1
        141        SEND_VAL                                                 ~99
        142        DO_ICALL                                         $100    
        143        CONCAT                                           ~101    ~94, $100
        144        CONCAT                                           ~102    ~101, '%0A'
        145        ECHO                                                     ~102
   86   146        INIT_FCALL                                               'round'
        147        MUL                                              ~103    !5, 0.25
        148        ADD                                              ~104    600, ~103
        149        ADD                                              ~105    ~104, !5
        150        MUL                                              ~106    ~105, 0.91
        151        SEND_VAL                                                 ~106
        152        DO_ICALL                                         $107    
        153        ASSIGN                                                   !1, $107
   87   154        PRE_INC                                                  !0
   88   155        MUL                                              ~110    !5, 0.06
        156        ASSIGN_OP                                     1          !5, ~110
   82   157        PRE_INC                                                  !6
        158    >   IS_SMALLER_OR_EQUAL                                      !6, 21
        159      > JMPNZ                                                    ~113, ->121
   89   160    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.66 ms | 1412 KiB | 15 Q