3v4l.org

run code in 300+ PHP versions simultaneously
<?php $body = ""; $table = "<table style=\"margin: 0 auto;\" border=\"2\" summary=\"Average per Channel\">"; $endTable = "</table>"; $fila = "<tr>"; $endFila = "</tr>"; $cabecera = "<th colspan=\"2\">"; $endCabecera = "</th>"; $detalle = "<td colspan=\"1\">"; $endDetalle = "</td>"; $bold = "<strong>"; $endBold = "</strong>"; $body = $table."\n".$fila; $arr_header_detalle = array(); $arr["functional"]["online"] = "0.9080"; $arr["functional"]["retail"] = "0.4080"; $arr["regression"]["online"] = "0.5080"; $arr["integration"]["online"] = "0.3080"; $arr["integration"]["retail"] = "0.2080"; $tpt = array("automation","functional","regression","integration"); $ch = array("Agnostic","Online","Retail"); for($i=0;$i<sizeOf($tpt);$i++){ $aux_tpt = $tpt[$i]; if(array_key_exists($aux_tpt ,$arr)){ $arr_header_detalle[$aux_tpt]["header"] = $cabecera.$bold.$aux_tpt.$endBold.$endCabecera."\n"; if(isset($arr[$aux_tpt]["online"])){ $arr_header_detalle[$aux_tpt]["Online"] = $detalle.$bold."Online".$endBold.$endDetalle."\n". $detalle.number_format($arr[$aux_tpt]["online"], 2, "." , ".")."%".$endDetalle."\n"; } if(isset($arr[$aux_tpt]["retail"])){ $arr_header_detalle[$aux_tpt]["Retail"] = $detalle.$bold."Retail".$endBold.$endDetalle."\n". $detalle.number_format($arr[$aux_tpt]["retail"], 2, "." , ".")."%".$endDetalle."\n"; } } } for($i=0;$i<sizeOf($tpt);$i++){ $aux_tpt = $tpt[$i]; if(array_key_exists($aux_tpt ,$arr_header_detalle)){ $body .= $arr_header_detalle[$aux_tpt]["header"]; } } $body .= $endFila."\n"; $arr = array("Online"=>array(),"Retail"=>array()); for($i=0;$i<sizeOf($tpt);$i++){ $aux_tpt = $tpt[$i]; if(array_key_exists($aux_tpt ,$arr_header_detalle)){ for($j=0;$j<sizeOf($ch);$j++){ $aux_ch = $ch[$j]; if(isset($arr_header_detalle[$aux_tpt][$aux_ch])){ switch($aux_ch){ case "Online": array_push($arr[$aux_ch],$arr_header_detalle[$aux_tpt][$aux_ch]); break; case "Retail": array_push($arr[$aux_ch],$arr_header_detalle[$aux_tpt][$aux_ch]); break; } } } } } for($j=0;$j<sizeOf($ch);$j++){ $aux_ch = $ch[$j]; if(array_key_exists($aux_ch,$arr)){ $body .= $fila."\n"; for($i=0;$i<sizeOf($arr[$aux_ch]);$i++){ $body .= $arr[$aux_ch][$i]; } $body .= $endFila."\n"; } } $body .= $endTable; echo $body;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 95
Branch analysis from position: 95
2 jumps found. (Code = 44) Position 1 = 98, Position 2 = 34
Branch analysis from position: 98
1 jumps found. (Code = 42) Position 1 = 108
Branch analysis from position: 108
2 jumps found. (Code = 44) Position 1 = 111, Position 2 = 100
Branch analysis from position: 111
1 jumps found. (Code = 42) Position 1 = 154
Branch analysis from position: 154
2 jumps found. (Code = 44) Position 1 = 157, Position 2 = 116
Branch analysis from position: 157
1 jumps found. (Code = 42) Position 1 = 178
Branch analysis from position: 178
2 jumps found. (Code = 44) Position 1 = 181, Position 2 = 159
Branch analysis from position: 181
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 159
2 jumps found. (Code = 43) Position 1 = 163, Position 2 = 177
Branch analysis from position: 163
1 jumps found. (Code = 42) Position 1 = 171
Branch analysis from position: 171
2 jumps found. (Code = 44) Position 1 = 175, Position 2 = 167
Branch analysis from position: 175
2 jumps found. (Code = 44) Position 1 = 181, Position 2 = 159
Branch analysis from position: 181
Branch analysis from position: 159
Branch analysis from position: 167
2 jumps found. (Code = 44) Position 1 = 175, Position 2 = 167
Branch analysis from position: 175
Branch analysis from position: 167
Branch analysis from position: 177
Branch analysis from position: 116
2 jumps found. (Code = 43) Position 1 = 120, Position 2 = 153
Branch analysis from position: 120
1 jumps found. (Code = 42) Position 1 = 150
Branch analysis from position: 150
2 jumps found. (Code = 44) Position 1 = 153, Position 2 = 122
Branch analysis from position: 153
2 jumps found. (Code = 44) Position 1 = 157, Position 2 = 116
Branch analysis from position: 157
Branch analysis from position: 116
Branch analysis from position: 122
2 jumps found. (Code = 43) Position 1 = 127, Position 2 = 149
Branch analysis from position: 127
4 jumps found. (Code = 188) Position 1 = 133, Position 2 = 141, Position 3 = 149, Position 4 = 128
Branch analysis from position: 133
1 jumps found. (Code = 42) Position 1 = 149
Branch analysis from position: 149
2 jumps found. (Code = 44) Position 1 = 153, Position 2 = 122
Branch analysis from position: 153
Branch analysis from position: 122
Branch analysis from position: 141
1 jumps found. (Code = 42) Position 1 = 149
Branch analysis from position: 149
Branch analysis from position: 149
Branch analysis from position: 128
2 jumps found. (Code = 44) Position 1 = 130, Position 2 = 133
Branch analysis from position: 130
2 jumps found. (Code = 44) Position 1 = 132, Position 2 = 141
Branch analysis from position: 132
1 jumps found. (Code = 42) Position 1 = 149
Branch analysis from position: 149
Branch analysis from position: 141
Branch analysis from position: 133
Branch analysis from position: 149
Branch analysis from position: 153
Branch analysis from position: 100
2 jumps found. (Code = 43) Position 1 = 104, Position 2 = 107
Branch analysis from position: 104
2 jumps found. (Code = 44) Position 1 = 111, Position 2 = 100
Branch analysis from position: 111
Branch analysis from position: 100
Branch analysis from position: 107
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 94
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 49, Position 2 = 70
Branch analysis from position: 49
2 jumps found. (Code = 43) Position 1 = 73, Position 2 = 94
Branch analysis from position: 73
2 jumps found. (Code = 44) Position 1 = 98, Position 2 = 34
Branch analysis from position: 98
Branch analysis from position: 34
Branch analysis from position: 94
Branch analysis from position: 70
Branch analysis from position: 94
filename:       /in/I8h1L
function name:  (null)
number of ops:  184
compiled vars:  !0 = $body, !1 = $table, !2 = $endTable, !3 = $fila, !4 = $endFila, !5 = $cabecera, !6 = $endCabecera, !7 = $detalle, !8 = $endDetalle, !9 = $bold, !10 = $endBold, !11 = $arr_header_detalle, !12 = $arr, !13 = $tpt, !14 = $ch, !15 = $i, !16 = $aux_tpt, !17 = $j, !18 = $aux_ch
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, ''
    5     1        ASSIGN                                                   !1, '%3Ctable+style%3D%22margin%3A+0+auto%3B%22+border%3D%222%22+summary%3D%22Average+per+Channel%22%3E'
    6     2        ASSIGN                                                   !2, '%3C%2Ftable%3E'
    8     3        ASSIGN                                                   !3, '%3Ctr%3E'
    9     4        ASSIGN                                                   !4, '%3C%2Ftr%3E'
   11     5        ASSIGN                                                   !5, '%3Cth+colspan%3D%222%22%3E'
   12     6        ASSIGN                                                   !6, '%3C%2Fth%3E'
   14     7        ASSIGN                                                   !7, '%3Ctd+colspan%3D%221%22%3E'
   15     8        ASSIGN                                                   !8, '%3C%2Ftd%3E'
   17     9        ASSIGN                                                   !9, '%3Cstrong%3E'
   18    10        ASSIGN                                                   !10, '%3C%2Fstrong%3E'
   20    11        CONCAT                                           ~30     !1, '%0A'
         12        CONCAT                                           ~31     ~30, !3
         13        ASSIGN                                                   !0, ~31
   22    14        ASSIGN                                                   !11, <array>
   24    15        FETCH_DIM_W                                      $34     !12, 'functional'
         16        ASSIGN_DIM                                               $34, 'online'
         17        OP_DATA                                                  '0.9080'
   25    18        FETCH_DIM_W                                      $36     !12, 'functional'
         19        ASSIGN_DIM                                               $36, 'retail'
         20        OP_DATA                                                  '0.4080'
   26    21        FETCH_DIM_W                                      $38     !12, 'regression'
         22        ASSIGN_DIM                                               $38, 'online'
         23        OP_DATA                                                  '0.5080'
   27    24        FETCH_DIM_W                                      $40     !12, 'integration'
         25        ASSIGN_DIM                                               $40, 'online'
         26        OP_DATA                                                  '0.3080'
   28    27        FETCH_DIM_W                                      $42     !12, 'integration'
         28        ASSIGN_DIM                                               $42, 'retail'
         29        OP_DATA                                                  '0.2080'
   30    30        ASSIGN                                                   !13, <array>
   31    31        ASSIGN                                                   !14, <array>
   33    32        ASSIGN                                                   !15, 0
         33      > JMP                                                      ->95
   35    34    >   FETCH_DIM_R                                      ~47     !13, !15
         35        ASSIGN                                                   !16, ~47
   37    36        ARRAY_KEY_EXISTS                                         !16, !12
         37      > JMPZ                                                     ~49, ->94
   39    38    >   CONCAT                                           ~52     !5, !9
         39        CONCAT                                           ~53     ~52, !16
         40        CONCAT                                           ~54     ~53, !10
         41        CONCAT                                           ~55     ~54, !6
         42        CONCAT                                           ~56     ~55, '%0A'
         43        FETCH_DIM_W                                      $50     !11, !16
         44        ASSIGN_DIM                                               $50, 'header'
         45        OP_DATA                                                  ~56
   41    46        FETCH_DIM_IS                                     ~57     !12, !16
         47        ISSET_ISEMPTY_DIM_OBJ                         0          ~57, 'online'
         48      > JMPZ                                                     ~58, ->70
   43    49    >   CONCAT                                           ~61     !7, !9
         50        CONCAT                                           ~62     ~61, 'Online'
         51        CONCAT                                           ~63     ~62, !10
         52        CONCAT                                           ~64     ~63, !8
         53        CONCAT                                           ~65     ~64, '%0A'
   44    54        CONCAT                                           ~66     ~65, !7
         55        INIT_FCALL                                               'number_format'
         56        FETCH_DIM_R                                      ~67     !12, !16
         57        FETCH_DIM_R                                      ~68     ~67, 'online'
         58        SEND_VAL                                                 ~68
         59        SEND_VAL                                                 2
         60        SEND_VAL                                                 '.'
         61        SEND_VAL                                                 '.'
         62        DO_ICALL                                         $69     
         63        CONCAT                                           ~70     ~66, $69
         64        CONCAT                                           ~71     ~70, '%25'
         65        CONCAT                                           ~72     ~71, !8
         66        CONCAT                                           ~73     ~72, '%0A'
   43    67        FETCH_DIM_W                                      $59     !11, !16
         68        ASSIGN_DIM                                               $59, 'Online'
   44    69        OP_DATA                                                  ~73
   48    70    >   FETCH_DIM_IS                                     ~74     !12, !16
         71        ISSET_ISEMPTY_DIM_OBJ                         0          ~74, 'retail'
         72      > JMPZ                                                     ~75, ->94
   50    73    >   CONCAT                                           ~78     !7, !9
         74        CONCAT                                           ~79     ~78, 'Retail'
         75        CONCAT                                           ~80     ~79, !10
         76        CONCAT                                           ~81     ~80, !8
         77        CONCAT                                           ~82     ~81, '%0A'
   51    78        CONCAT                                           ~83     ~82, !7
         79        INIT_FCALL                                               'number_format'
         80        FETCH_DIM_R                                      ~84     !12, !16
         81        FETCH_DIM_R                                      ~85     ~84, 'retail'
         82        SEND_VAL                                                 ~85
         83        SEND_VAL                                                 2
         84        SEND_VAL                                                 '.'
         85        SEND_VAL                                                 '.'
         86        DO_ICALL                                         $86     
         87        CONCAT                                           ~87     ~83, $86
         88        CONCAT                                           ~88     ~87, '%25'
         89        CONCAT                                           ~89     ~88, !8
         90        CONCAT                                           ~90     ~89, '%0A'
   50    91        FETCH_DIM_W                                      $76     !11, !16
         92        ASSIGN_DIM                                               $76, 'Retail'
   51    93        OP_DATA                                                  ~90
   33    94    >   PRE_INC                                                  !15
         95    >   COUNT                                            ~92     !13
         96        IS_SMALLER                                               !15, ~92
         97      > JMPNZ                                                    ~93, ->34
   57    98    >   ASSIGN                                                   !15, 0
         99      > JMP                                                      ->108
   59   100    >   FETCH_DIM_R                                      ~95     !13, !15
        101        ASSIGN                                                   !16, ~95
   61   102        ARRAY_KEY_EXISTS                                         !16, !11
        103      > JMPZ                                                     ~97, ->107
   63   104    >   FETCH_DIM_R                                      ~98     !11, !16
        105        FETCH_DIM_R                                      ~99     ~98, 'header'
        106        ASSIGN_OP                                     8          !0, ~99
   57   107    >   PRE_INC                                                  !15
        108    >   COUNT                                            ~102    !13
        109        IS_SMALLER                                               !15, ~102
        110      > JMPNZ                                                    ~103, ->100
   69   111    >   CONCAT                                           ~104    !4, '%0A'
        112        ASSIGN_OP                                     8          !0, ~104
   71   113        ASSIGN                                                   !12, <array>
   73   114        ASSIGN                                                   !15, 0
        115      > JMP                                                      ->154
   75   116    >   FETCH_DIM_R                                      ~108    !13, !15
        117        ASSIGN                                                   !16, ~108
   77   118        ARRAY_KEY_EXISTS                                         !16, !11
        119      > JMPZ                                                     ~110, ->153
   79   120    >   ASSIGN                                                   !17, 0
        121      > JMP                                                      ->150
   81   122    >   FETCH_DIM_R                                      ~112    !14, !17
        123        ASSIGN                                                   !18, ~112
   83   124        FETCH_DIM_IS                                     ~114    !11, !16
        125        ISSET_ISEMPTY_DIM_OBJ                         0          ~114, !18
        126      > JMPZ                                                     ~115, ->149
   85   127    > > SWITCH_STRING                                            !18, [ 'Online':->133, 'Retail':->141, ], ->149
   87   128    >   IS_EQUAL                                                 !18, 'Online'
        129      > JMPNZ                                                    ~116, ->133
   90   130    >   IS_EQUAL                                                 !18, 'Retail'
        131      > JMPNZ                                                    ~116, ->141
        132    > > JMP                                                      ->149
   88   133    >   INIT_FCALL                                               'array_push'
        134        FETCH_DIM_W                                      $117    !12, !18
        135        SEND_REF                                                 $117
        136        FETCH_DIM_R                                      ~118    !11, !16
        137        FETCH_DIM_R                                      ~119    ~118, !18
        138        SEND_VAL                                                 ~119
        139        DO_ICALL                                                 
   89   140      > JMP                                                      ->149
   91   141    >   INIT_FCALL                                               'array_push'
        142        FETCH_DIM_W                                      $121    !12, !18
        143        SEND_REF                                                 $121
        144        FETCH_DIM_R                                      ~122    !11, !16
        145        FETCH_DIM_R                                      ~123    ~122, !18
        146        SEND_VAL                                                 ~123
        147        DO_ICALL                                                 
   92   148      > JMP                                                      ->149
   79   149    >   PRE_INC                                                  !17
        150    >   COUNT                                            ~126    !14
        151        IS_SMALLER                                               !17, ~126
        152      > JMPNZ                                                    ~127, ->122
   73   153    >   PRE_INC                                                  !15
        154    >   COUNT                                            ~129    !13
        155        IS_SMALLER                                               !15, ~129
        156      > JMPNZ                                                    ~130, ->116
  100   157    >   ASSIGN                                                   !17, 0
        158      > JMP                                                      ->178
  102   159    >   FETCH_DIM_R                                      ~132    !14, !17
        160        ASSIGN                                                   !18, ~132
  104   161        ARRAY_KEY_EXISTS                                         !18, !12
        162      > JMPZ                                                     ~134, ->177
  106   163    >   CONCAT                                           ~135    !3, '%0A'
        164        ASSIGN_OP                                     8          !0, ~135
  108   165        ASSIGN                                                   !15, 0
        166      > JMP                                                      ->171
  110   167    >   FETCH_DIM_R                                      ~138    !12, !18
        168        FETCH_DIM_R                                      ~139    ~138, !15
        169        ASSIGN_OP                                     8          !0, ~139
  108   170        PRE_INC                                                  !15
        171    >   FETCH_DIM_R                                      ~142    !12, !18
        172        COUNT                                            ~143    ~142
        173        IS_SMALLER                                               !15, ~143
        174      > JMPNZ                                                    ~144, ->167
  114   175    >   CONCAT                                           ~145    !4, '%0A'
        176        ASSIGN_OP                                     8          !0, ~145
  100   177    >   PRE_INC                                                  !17
        178    >   COUNT                                            ~148    !14
        179        IS_SMALLER                                               !17, ~148
        180      > JMPNZ                                                    ~149, ->159
  121   181    >   ASSIGN_OP                                     8          !0, !2
  123   182        ECHO                                                     !0
        183      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
220.32 ms | 1412 KiB | 17 Q