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 print_r($tableInfo); //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 = 13, Position 2 = 23
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 23
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/WJYiU
function name:  (null)
number of ops:  25
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
   16     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
   20    11        ECHO                                                     '++++%3Ctable%3E%0A'
   22    12      > FE_RESET_R                                       $9      !1, ->23
         13    > > FE_FETCH_R                                       ~10     $9, !2, ->23
         14    >   ASSIGN                                                   !3, ~10
   24    15        ECHO                                                     '++++++++%3Ctr%3E%0A++++++++++++%3Ctd%3E'
   25    16        ECHO                                                     !3
         17        ECHO                                                     '%3C%2Ftd%3E%0A++++++++++++%3Ctd%3E'
   26    18        ECHO                                                     !2
         19        ECHO                                                     '%3C%2Ftd%3E%0A++++++++++++%3Ctd%3E'
   27    20        ECHO                                                     !2
         21        ECHO                                                     '%3C%2Ftd%3E%0A++++++++%3C%2Ftr%3E%0A++++%3C%2Ftbale%3E%0A'
   22    22      > JMP                                                      ->13
         23    >   FE_FREE                                                  $9
   31    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.86 ms | 940 KiB | 18 Q