3v4l.org

run code in 500+ PHP versions simultaneously
<?php $fruits = [ 'ORANGE' => [ 'Size' => '0.20', 'Cost' => '0.49', 'Lbs.' => '0.60', ], 'LEMON' => [ 'Size' => '0.15', 'Cost' => '0.29', 'Lbs.' => '0.20', ] ]; $keys = array_keys($fruits); if(!empty($keys)) $innerKeys = array_keys($fruits[$keys[0]]); echo '<table id="fruits" style="width:400px;border:1px solid black;">'; echo '<thead><tr>'; echo '<td>----</td>'; foreach($keys as $key) echo '<td>'.$key.'</td>'; echo '</tr></thead>'; echo '<tbody>'; foreach($innerKeys as $inKey){ echo '<tr>'; echo '<td>'.$inKey.'</td>'; foreach($fruits as $fKey => $val){ echo '<td>'.$val[$inKey].'</td>'; } echo '</tr>'; } echo '</tbody>'; echo '</table>';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 23
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 23
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 23
2 jumps found. (Code = 77) Position 1 = 27, Position 2 = 43
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 43
Branch analysis from position: 28
2 jumps found. (Code = 77) Position 1 = 33, Position 2 = 40
Branch analysis from position: 33
2 jumps found. (Code = 78) Position 1 = 34, Position 2 = 40
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
Branch analysis from position: 40
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 40
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
Branch analysis from position: 23
Branch analysis from position: 14
filename:       /in/WYZOM
function name:  (null)
number of ops:  47
compiled vars:  !0 = $fruits, !1 = $keys, !2 = $innerKeys, !3 = $key, !4 = $inKey, !5 = $val, !6 = $fKey
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   17     1        INIT_FCALL                                                   'array_keys'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $8      
          4        ASSIGN                                                       !1, $8
   18     5        ISSET_ISEMPTY_CV                                     ~10     !1
          6        BOOL_NOT                                             ~11     ~10
          7      > JMPZ                                                         ~11, ->14
   19     8    >   INIT_FCALL                                                   'array_keys'
          9        FETCH_DIM_R                                          ~12     !1, 0
         10        FETCH_DIM_R                                          ~13     !0, ~12
         11        SEND_VAL                                                     ~13
         12        DO_ICALL                                             $14     
         13        ASSIGN                                                       !2, $14
   21    14    >   ECHO                                                         '%3Ctable+id%3D%22fruits%22+style%3D%22width%3A400px%3Bborder%3A1px+solid+black%3B%22%3E'
   22    15        ECHO                                                         '%3Cthead%3E%3Ctr%3E'
   23    16        ECHO                                                         '%3Ctd%3E----%3C%2Ftd%3E'
   24    17      > FE_RESET_R                                           $16     !1, ->23
         18    > > FE_FETCH_R                                                   $16, !3, ->23
   25    19    >   CONCAT                                               ~17     '%3Ctd%3E', !3
         20        CONCAT                                               ~18     ~17, '%3C%2Ftd%3E'
         21        ECHO                                                         ~18
   24    22      > JMP                                                          ->18
         23    >   FE_FREE                                                      $16
   26    24        ECHO                                                         '%3C%2Ftr%3E%3C%2Fthead%3E'
   27    25        ECHO                                                         '%3Ctbody%3E'
   28    26      > FE_RESET_R                                           $19     !2, ->43
         27    > > FE_FETCH_R                                                   $19, !4, ->43
   29    28    >   ECHO                                                         '%3Ctr%3E'
   30    29        CONCAT                                               ~20     '%3Ctd%3E', !4
         30        CONCAT                                               ~21     ~20, '%3C%2Ftd%3E'
         31        ECHO                                                         ~21
   31    32      > FE_RESET_R                                           $22     !0, ->40
         33    > > FE_FETCH_R                                           ~23     $22, !5, ->40
         34    >   ASSIGN                                                       !6, ~23
   32    35        FETCH_DIM_R                                          ~25     !5, !4
         36        CONCAT                                               ~26     '%3Ctd%3E', ~25
         37        CONCAT                                               ~27     ~26, '%3C%2Ftd%3E'
         38        ECHO                                                         ~27
   31    39      > JMP                                                          ->33
         40    >   FE_FREE                                                      $22
   34    41        ECHO                                                         '%3C%2Ftr%3E'
   28    42      > JMP                                                          ->27
         43    >   FE_FREE                                                      $19
   36    44        ECHO                                                         '%3C%2Ftbody%3E'
   37    45        ECHO                                                         '%3C%2Ftable%3E'
         46      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
137.46 ms | 2249 KiB | 14 Q