3v4l.org

run code in 300+ PHP versions simultaneously
<?php $info = array( array('catogary' => '麵包紙杯', 'typeA' => 'DPK219', 'typeB' => 'VAC001', 'price' => '1.00'), array('catogary' => '麵包紙杯', 'typeA' => 'DPK219', 'typeB' => 'VBW001', 'price' => '1.00'), array('catogary' => '罐裝蟹肉 ', 'typeA' => 'RCN061-1', 'typeB' => 'VAC001', 'price' => '2.00'), array('catogary' => '罐裝蟹肉 ', 'typeA' => 'RCN061-1', 'typeB' => 'VBW001', 'price' => '2.00'), array('catogary' => '牛淋片5mm', 'typeA' => 'RFB300-2', 'typeB' => 'VAC001', 'price' => '3.00'), array('catogary' => '牛淋片5mm', 'typeA' => 'RFB300-2', 'typeB' => 'VBW001', 'price' => '3.00'), array('catogary' => '厚牛淋片', 'typeA' => 'RFB300-3', 'typeB' => 'VAC001', 'price' => '4.00'), array('catogary' => '厚牛淋片', 'typeA' => 'RFB300-3', 'typeB' => 'VBW001', 'price' => '4.00'), ); $tableInfo = array(); $tableInfo = array_column($info, 'catogary', 'price');//if php version > 5.5 //foreach($info as $item) // $tableInfo[$item['catogary']] = $item['price']; ?> <table> <?php foreach($tableInfo as $catogary => $price) { ?> <tr> <td><?=$catogary?></td> <td><?=$price?></td> <td><?=$price?></td> </tr> </tbale> <?php }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 20
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 20
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/jsgdT
function name:  (null)
number of ops:  22
compiled vars:  !0 = $info, !1 = $tableInfo, !2 = $price, !3 = $catogary
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   13     1        ASSIGN                                                   !1, <array>
   15     2        INIT_FCALL                                               'array_column'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'catogary'
          5        SEND_VAL                                                 'price'
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !1, $6
   20     8        ECHO                                                     '++++%3Ctable%3E%0A'
   22     9      > FE_RESET_R                                       $8      !1, ->20
         10    > > FE_FETCH_R                                       ~9      $8, !2, ->20
         11    >   ASSIGN                                                   !3, ~9
   24    12        ECHO                                                     '++++++++%3Ctr%3E%0A++++++++++++%3Ctd%3E'
   25    13        ECHO                                                     !3
         14        ECHO                                                     '%3C%2Ftd%3E%0A++++++++++++%3Ctd%3E'
   26    15        ECHO                                                     !2
         16        ECHO                                                     '%3C%2Ftd%3E%0A++++++++++++%3Ctd%3E'
   27    17        ECHO                                                     !2
         18        ECHO                                                     '%3C%2Ftd%3E%0A++++++++%3C%2Ftr%3E%0A++++%3C%2Ftbale%3E%0A'
   22    19      > JMP                                                      ->10
         20    >   FE_FREE                                                  $8
   31    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.2 ms | 1395 KiB | 15 Q