3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ 0 => [ 'Label 1' => 1, // member C1 'Label 2' => 0, 'Label 3' => 0, ], 1 => [ 'Label 1' => 0, 'Label 2' => 0, 'Label 3' => 1, // member C2 ], 2 => [ 'Label 1' => 0, 'Label 2' => 1, // member C3 'Label 3' => 0, ] ]; ?> <table> <thead> <tr> <td>Label</td> <td>Group</td> </tr> </thead> <tbody> <?php foreach($data[0] as $label => $value): ?> <tr> <td><?php echo $label; ?></td> <td><?php if($value == 1) { echo 'C1'; } if($data[1][$label] == 1) { echo 'C2'; } if($data[2][$label] == 1) { echo 'C3'; } ?></td> </tr> <?php endforeach; ?> </tbody> </table>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 24
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 24
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 22
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 22
Branch analysis from position: 17
Branch analysis from position: 12
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/qb3FA
function name:  (null)
number of ops:  27
compiled vars:  !0 = $data, !1 = $value, !2 = $label
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   22     1        ECHO                                                     '%3Ctable%3E%0A++%3Cthead%3E%0A++++%3Ctr%3E%0A++++++%3Ctd%3ELabel%3C%2Ftd%3E%0A++++++%3Ctd%3EGroup%3C%2Ftd%3E%0A++++%3C%2Ftr%3E%0A++%3C%2Fthead%3E%0A++%3Ctbody%3E%0A++++'
   30     2        FETCH_DIM_R                                      ~4      !0, 0
          3      > FE_RESET_R                                       $5      ~4, ->24
          4    > > FE_FETCH_R                                       ~6      $5, !1, ->24
          5    >   ASSIGN                                                   !2, ~6
   31     6        ECHO                                                     '++++%3Ctr%3E%0A++++++%3Ctd%3E'
   32     7        ECHO                                                     !2
          8        ECHO                                                     '%3C%2Ftd%3E%0A++++++%3Ctd%3E'
   34     9        IS_EQUAL                                                 !1, 1
         10      > JMPZ                                                     ~8, ->12
         11    >   ECHO                                                     'C1'
   35    12    >   FETCH_DIM_R                                      ~9      !0, 1
         13        FETCH_DIM_R                                      ~10     ~9, !2
         14        IS_EQUAL                                                 ~10, 1
         15      > JMPZ                                                     ~11, ->17
         16    >   ECHO                                                     'C2'
   36    17    >   FETCH_DIM_R                                      ~12     !0, 2
         18        FETCH_DIM_R                                      ~13     ~12, !2
         19        IS_EQUAL                                                 ~13, 1
         20      > JMPZ                                                     ~14, ->22
         21    >   ECHO                                                     'C3'
   37    22    >   ECHO                                                     '%3C%2Ftd%3E%0A++++%3C%2Ftr%3E%0A++++'
   30    23      > JMP                                                      ->4
         24    >   FE_FREE                                                  $5
   40    25        ECHO                                                     '++%3C%2Ftbody%3E%0A%3C%2Ftable%3E'
   41    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.51 ms | 996 KiB | 13 Q