3v4l.org

run code in 300+ PHP versions simultaneously
<?php $parent = [ 0 => "num", 1 => "No", 2 => "Name", 3 => "Phone", 4 => "Price", 5 => "Date", ]; $child = [ 0 => [ "No" => "FR201605832", "Price" => 199.0, "Date" => "2016-09-01", "num" => "19", "Name" => "Tom", "Phone" => "0900123456", ], 1 => [ "No" => "EC2016010100001", "Price" => 1680.0, "Date" => "2016-09-01", "num" => "1680", "Name" => "Ted", "Phone" => "0900321654", ] ]; $modified = []; foreach($parent as $i => $val) { foreach($child as $ci => $data) { $modified[$ci][$val] = $data[$val]; } } echo "<pre>";print_r($modified);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 16
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 16
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 14
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/amNep
function name:  (null)
number of ops:  22
compiled vars:  !0 = $parent, !1 = $child, !2 = $modified, !3 = $val, !4 = $i, !5 = $data, !6 = $ci
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        ASSIGN                                                   !1, <array>
   30     2        ASSIGN                                                   !2, <array>
   31     3      > FE_RESET_R                                       $10     !0, ->16
          4    > > FE_FETCH_R                                       ~11     $10, !3, ->16
          5    >   ASSIGN                                                   !4, ~11
   32     6      > FE_RESET_R                                       $13     !1, ->14
          7    > > FE_FETCH_R                                       ~14     $13, !5, ->14
          8    >   ASSIGN                                                   !6, ~14
   33     9        FETCH_DIM_R                                      ~18     !5, !3
         10        FETCH_DIM_W                                      $16     !2, !6
         11        ASSIGN_DIM                                               $16, !3
         12        OP_DATA                                                  ~18
   32    13      > JMP                                                      ->7
         14    >   FE_FREE                                                  $13
   31    15      > JMP                                                      ->4
         16    >   FE_FREE                                                  $10
   36    17        ECHO                                                     '%3Cpre%3E'
         18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.36 ms | 1010 KiB | 14 Q