3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ 'data' => [ [ 'attribute_set' => 'default', 'description' => 'productdescription', 'is_in_stock' => 1, 'meta_description' => 'Product meta description', 'meta_keyword' => 'Product meta keyword', 'meta_title' => 'Product meta title', 'name' => 'myproduct6', 'price' => 100, 'qty' => 1000, 're_skus' => 'sdfefwef', 'short_description' => 'this is a short descriptio', 'sku' => 'myproduct_surabhi7', 'status' => 1, 'store' => 'admin', 'tax_class_id' => 4, 'type' => 'simple', 'url_key' => 'my-product', 'url_path' => 'my-product.html', 'visibility' => 4, 'weight' => 10, ], [ 'attribute_set' => 'default', 'description' => 'productdescription', 'is_in_stock' => 1, 'meta_description' => 'Product meta description', 'meta_keyword' => 'Product meta keyword', 'meta_title' => 'Product meta title', 'name' => 'myproduct6', 'price' => 100, 'qty' => 1000, 're_skus' => 'sdfefwef', 'short_description' => 'this is a short descriptio', 'sku' => 'myproduct_surabhi7', 'status' => 1, 'store' => 'admin', 'tax_class_id' => 4, 'type' => 'simple', 'url_key' => 'my-product', 'url_path' => 'my-product.html', 'visibility' => 4, 'weight' => 10, ] ] ] ]; $result = []; foreach ($array[0]['data'] as $i => $data) { $result[$i][$i] = $data; } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/eACK2
function name:  (null)
number of ops:  16
compiled vars:  !0 = $array, !1 = $result, !2 = $data, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   54     1        ASSIGN                                                   !1, <array>
   55     2        FETCH_DIM_R                                      ~6      !0, 0
          3        FETCH_DIM_R                                      ~7      ~6, 'data'
          4      > FE_RESET_R                                       $8      ~7, ->11
          5    > > FE_FETCH_R                                       ~9      $8, !2, ->11
          6    >   ASSIGN                                                   !3, ~9
   56     7        FETCH_DIM_W                                      $11     !1, !3
          8        ASSIGN_DIM                                               $11, !3
          9        OP_DATA                                                  !2
   55    10      > JMP                                                      ->5
         11    >   FE_FREE                                                  $8
   58    12        INIT_FCALL                                               'var_export'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.91 ms | 1004 KiB | 14 Q