3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( array('Title 1'=>'text11', 'Title 2'=>'text12'), array('Title 1'=>'text21', 'Title 2'=>'text22'), array('Title 1'=>'text31', 'Title 2'=>'text32'), array('Title 1'=>'text41', 'Title 2'=>'text42', 'special'=>'style1'), array('Title 1'=>'text51', 'Title 2'=>'text52', 'special'=>'style2'), ); ?> <table> <thead> <tr> <th>Title 1</th> <th>Title 2</th> </tr> </thead> <tbody> <?php foreach ($data as $key=>$row): if (isset($row["special"])) { $class = " class='" . $row["special"]. "'"; unset($row["special"]); } else { $class=''; }?> <tr<?php echo $class ?>> <td><?php echo implode('</td><td>', $row); ?></td> </tr> <?php endforeach; ?> </tbody> </table>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 24
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 24
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/fqJbk
function name:  (null)
number of ops:  27
compiled vars:  !0 = $data, !1 = $row, !2 = $key, !3 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   10     1        ECHO                                                     '%0A%3Ctable%3E%0A++++++%3Cthead%3E%0A++++++++%3Ctr%3E%0A++++++++++%3Cth%3ETitle+1%3C%2Fth%3E%0A++++++++++%3Cth%3ETitle+2%3C%2Fth%3E%0A++++++++%3C%2Ftr%3E%0A++++++%3C%2Fthead%3E%0A++++++%3Ctbody%3E%0A++++'
   19     2      > FE_RESET_R                                       $5      !0, ->24
          3    > > FE_FETCH_R                                       ~6      $5, !1, ->24
          4    >   ASSIGN                                                   !2, ~6
   20     5        ISSET_ISEMPTY_DIM_OBJ                         0          !1, 'special'
          6      > JMPZ                                                     ~8, ->13
   21     7    >   FETCH_DIM_R                                      ~9      !1, 'special'
          8        CONCAT                                           ~10     '+class%3D%27', ~9
          9        CONCAT                                           ~11     ~10, '%27'
         10        ASSIGN                                                   !3, ~11
   22    11        UNSET_DIM                                                !1, 'special'
   20    12      > JMP                                                      ->14
   24    13    >   ASSIGN                                                   !3, ''
   26    14    >   ECHO                                                     '++++++++%3Ctr'
         15        ECHO                                                     !3
         16        ECHO                                                     '%3E%0A++++++++++%3Ctd%3E'
   27    17        INIT_FCALL                                               'implode'
         18        SEND_VAL                                                 '%3C%2Ftd%3E%3Ctd%3E'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $14     
         21        ECHO                                                     $14
         22        ECHO                                                     '%3C%2Ftd%3E%0A++++++++%3C%2Ftr%3E%0A++++'
   19    23      > JMP                                                      ->3
         24    >   FE_FREE                                                  $5
   30    25        ECHO                                                     '++++++%3C%2Ftbody%3E%0A++++%3C%2Ftable%3E'
   31    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.84 ms | 1011 KiB | 14 Q