3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = [0 => 11, 1 => 2.5]; $arr2 = [ 0 => (object)[ "type" => 1, "creator_id" => 3, "creator_name" => "E1", "per_tar" => 300, "pro_tar" => 200, "ac" => 300, "PA" => 17, "Q1" => 800 ], 1 => (object)[ "type" => 1, "creator_id" => 3, "creator_name" => "E2", "per_tar" => 100, "pro_tar" => 170, "ac" => 0, "PA" => 7, "Q1" => 270 ] ]; foreach ($arr1 as $key=>$value){ $arr2[$key]->new = $value; } print_r($arr2); ?>
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/gsH6j
function name:  (null)
number of ops:  18
compiled vars:  !0 = $arr1, !1 = $arr2, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    5     1        CAST                                          8  ~5      <array>
          2        INIT_ARRAY                                       ~6      ~5, 0
   15     3        CAST                                          8  ~7      <array>
          4        ADD_ARRAY_ELEMENT                                ~6      ~7, 1
    3     5        ASSIGN                                                   !1, ~6
   26     6      > FE_RESET_R                                       $9      !0, ->13
          7    > > FE_FETCH_R                                       ~10     $9, !2, ->13
          8    >   ASSIGN                                                   !3, ~10
   27     9        FETCH_DIM_W                                      $12     !1, !3
         10        ASSIGN_OBJ                                               $12, 'new'
         11        OP_DATA                                                  !2
   26    12      > JMP                                                      ->7
         13    >   FE_FREE                                                  $9
   30    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
   31    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.92 ms | 1004 KiB | 14 Q