3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrays = [ "data" => [ ["degree_level" => " Bachelor's"], ["field_of_study" => "Science"], ["grade_point" => 3], ["criteria" => "desired"] ], ]; print_r($arrays); foreach($arrays["data"] as $dataKey => $data) { foreach ($data as $key => $value) { $arrays["data"][$key] = $value; } unset($arrays["data"][$dataKey]); } print_r($arrays);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 19
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 19
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 15
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/gvjg1
function name:  (null)
number of ops:  24
compiled vars:  !0 = $arrays, !1 = $data, !2 = $dataKey, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   13     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   15     4        FETCH_DIM_R                                      ~7      !0, 'data'
          5      > FE_RESET_R                                       $8      ~7, ->19
          6    > > FE_FETCH_R                                       ~9      $8, !1, ->19
          7    >   ASSIGN                                                   !2, ~9
   16     8      > FE_RESET_R                                       $11     !1, ->15
          9    > > FE_FETCH_R                                       ~12     $11, !3, ->15
         10    >   ASSIGN                                                   !4, ~12
   17    11        FETCH_DIM_W                                      $14     !0, 'data'
         12        ASSIGN_DIM                                               $14, !4
         13        OP_DATA                                                  !3
   16    14      > JMP                                                      ->9
         15    >   FE_FREE                                                  $11
   19    16        FETCH_DIM_UNSET                                  $16     !0, 'data'
         17        UNSET_DIM                                                $16, !2
   15    18      > JMP                                                      ->6
         19    >   FE_FREE                                                  $8
   21    20        INIT_FCALL                                               'print_r'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
127.91 ms | 1401 KiB | 15 Q