3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = array((object)['key' => 'VALID', 'value' => 'Y'], (object)['key' => 'YEAR', 'value' => 2018]); $data = array(); foreach ($value as $v) { $data[$v->key] = $v->value; } print_r($data);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/jTZ1P
function name:  (null)
number of ops:  18
compiled vars:  !0 = $value, !1 = $data, !2 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   CAST                                          8  ~3      <array>
          1        INIT_ARRAY                                       ~4      ~3
    3     2        CAST                                          8  ~5      <array>
          3        ADD_ARRAY_ELEMENT                                ~4      ~5
    2     4        ASSIGN                                                   !0, ~4
    4     5        ASSIGN                                                   !1, <array>
    5     6      > FE_RESET_R                                       $8      !0, ->13
          7    > > FE_FETCH_R                                               $8, !2, ->13
    6     8    >   FETCH_OBJ_R                                      ~9      !2, 'key'
          9        FETCH_OBJ_R                                      ~11     !2, 'value'
         10        ASSIGN_DIM                                               !1, ~9
         11        OP_DATA                                                  ~11
    5    12      > JMP                                                      ->7
         13    >   FE_FREE                                                  $8
    8    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.5 ms | 1436 KiB | 14 Q