3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ 'data' => [ 'nid' => 1, 'vid' => 1, 'type' => 'article', 'field_new' => [ 'und' => [ [ 'value' => 11111 ] ] ] ] ], [ 'data' => [ 'nid' => 2, 'vid' => 2, 'type' => 'article', 'field_new' => [ 'und' => [ [ 'value' => 33333 ] ] ] ] ] ]; foreach ($array as ['data' => &$data]) { $data['value'] = $data['field_new']['und'][0]['value']; unset($data['field_new']); } var_export($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 15
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/mbUa4
function name:  (null)
number of ops:  20
compiled vars:  !0 = $array, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   34     1      > FE_RESET_RW                                      $3      !0, ->15
          2    > > FE_FETCH_RW                                              $3, $4, ->15
          3    >   FETCH_LIST_W                                     $5      $4, 'data'
          4        MAKE_REF                                         $6      $5
          5        ASSIGN_REF                                               !1, $6
          6        FREE                                                     $4
   35     7        FETCH_DIM_R                                      ~9      !1, 'field_new'
          8        FETCH_DIM_R                                      ~10     ~9, 'und'
          9        FETCH_DIM_R                                      ~11     ~10, 0
         10        FETCH_DIM_R                                      ~12     ~11, 'value'
         11        ASSIGN_DIM                                               !1, 'value'
         12        OP_DATA                                                  ~12
   36    13        UNSET_DIM                                                !1, 'field_new'
   34    14      > JMP                                                      ->2
         15    >   FE_FREE                                                  $3
   38    16        INIT_FCALL                                               'var_export'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.58 ms | 1009 KiB | 14 Q