3v4l.org

run code in 300+ PHP versions simultaneously
<?php $partners = [ 0 => ['id'=>1, 'name'=>'Tset', 'site'=>'www.ya.ru'], 1 => ['id'=>2, 'name'=>'Maks', 'site'=>'google.ru'] ]; $tmp = []; foreach ($partners as $item) { $tmp[] = [ 'id' => $item['id'], 'name' => $item['name'], ]; $tmp[] = [ 'id' => $item['id'], 'site' => $item['site'], ]; }; print_r($tmp);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 17
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/nYC1s
function name:  (null)
number of ops:  22
compiled vars:  !0 = $partners, !1 = $tmp, !2 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, <array>
    9     2      > FE_RESET_R                                       $5      !0, ->17
          3    > > FE_FETCH_R                                               $5, !2, ->17
   10     4    >   FETCH_DIM_R                                      ~7      !2, 'id'
          5        INIT_ARRAY                                       ~8      ~7, 'id'
          6        FETCH_DIM_R                                      ~9      !2, 'name'
          7        ADD_ARRAY_ELEMENT                                ~8      ~9, 'name'
          8        ASSIGN_DIM                                               !1
          9        OP_DATA                                                  ~8
   11    10        FETCH_DIM_R                                      ~11     !2, 'id'
         11        INIT_ARRAY                                       ~12     ~11, 'id'
         12        FETCH_DIM_R                                      ~13     !2, 'site'
         13        ADD_ARRAY_ELEMENT                                ~12     ~13, 'site'
         14        ASSIGN_DIM                                               !1
         15        OP_DATA                                                  ~12
    9    16      > JMP                                                      ->3
         17    >   FE_FREE                                                  $5
   14    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.71 ms | 1400 KiB | 15 Q