3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ "36736" => [ "meta" => [ "Closing Date" => "", "Technical Consultant" => "", "Client Name" => "", "Stage" => "Waiting for Technical Assignment", "Contract Name" => "", "Signing Rate" => "", "Contract Number" => "", "Client Number" => "", "Closer Name" => "", "Completed On" => "2019-05-23", "Assigned Date" => "05/22/2019 12:28 pm", ], ], ]; $keys = ["Client Name", "Client Number", "Contract Name", "Contract Number", "Stage", "Closing Date", "Technical Consultant", "Signing Rate", "Closer Name", "Completed On", "Assigned Date"]; foreach ($arr as $key => &$value) { // & defines changes will be reflected at its address in memory $value['meta'] = array_replace(array_flip($keys), $value["meta"]); } print_r($arr);die;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
2 jumps found. (Code = 126) Position 1 = 4, Position 2 = 16
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 16
filename:       /in/RK4dT
function name:  (null)
number of ops:  22
compiled vars:  !0 = $arr, !1 = $keys, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   22     1        ASSIGN                                                   !1, <array>
   24     2      > FE_RESET_RW                                      $6      !0, ->16
          3    > > FE_FETCH_RW                                      ~7      $6, !2, ->16
          4    >   ASSIGN                                                   !3, ~7
   25     5        INIT_FCALL                                               'array_replace'
          6        INIT_FCALL                                               'array_flip'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $10     
          9        SEND_VAR                                                 $10
         10        FETCH_DIM_R                                      ~11     !2, 'meta'
         11        SEND_VAL                                                 ~11
         12        DO_ICALL                                         $12     
         13        ASSIGN_DIM                                               !2, 'meta'
         14        OP_DATA                                                  $12
   24    15      > JMP                                                      ->3
         16    >   FE_FREE                                                  $6
   27    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > EXIT                                                     
   28    21*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.44 ms | 1395 KiB | 19 Q