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 = 3, Position 2 = 9
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 22
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 22
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
Branch analysis from position: 9
filename:       /in/3Xacb
function name:  (null)
number of ops:  24
compiled vars:  !0 = $info, !1 = $tableInfo, !2 = $item, !3 = $price, !4 = $catogary
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   13     1        ASSIGN                                                   !1, <array>
   17     2      > FE_RESET_R                                       $7      !0, ->9
          3    > > FE_FETCH_R                                               $7, !2, ->9
   18     4    >   FETCH_DIM_R                                      ~8      !2, 'catogary'
          5        FETCH_DIM_R                                      ~10     !2, 'price'
          6        ASSIGN_DIM                                               !1, ~8
          7        OP_DATA                                                  ~10
   17     8      > JMP                                                      ->3
          9    >   FE_FREE                                                  $7
   20    10        ECHO                                                     '++++%3Ctable%3E%0A'
   22    11      > FE_RESET_R                                       $11     !1, ->22
         12    > > FE_FETCH_R                                       ~12     $11, !3, ->22
         13    >   ASSIGN                                                   !4, ~12
   24    14        ECHO                                                     '++++++++%3Ctr%3E%0A++++++++++++%3Ctd%3E'
   25    15        ECHO                                                     !4
         16        ECHO                                                     '%3C%2Ftd%3E%0A++++++++++++%3Ctd%3E'
   26    17        ECHO                                                     !3
         18        ECHO                                                     '%3C%2Ftd%3E%0A++++++++++++%3Ctd%3E'
   27    19        ECHO                                                     !3
         20        ECHO                                                     '%3C%2Ftd%3E%0A++++++++%3C%2Ftr%3E%0A++++%3C%2Ftbale%3E%0A'
   22    21      > JMP                                                      ->12
         22    >   FE_FREE                                                  $11
   31    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.82 ms | 1395 KiB | 13 Q