3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array_1 = array("1a" =>"dogs","2a" => "cats","3a" => "birds","4a" => "people"); $array_2 = array("4a" => "walking","2a" => "cats"); foreach ($array_1 as $key_1 => $value_1) { if (array_key_exists($key_1, $array_2)) { $array_1[$key_1] = $array_2[$key_1]; } } print_r($array_1);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 10
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/gd6ND
function name:  (null)
number of ops:  16
compiled vars:  !0 = $array_1, !1 = $array_2, !2 = $value_1, !3 = $key_1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    5     2      > FE_RESET_R                                       $6      !0, ->11
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->11
          4    >   ASSIGN                                                   !3, ~7
    6     5        ARRAY_KEY_EXISTS                                         !3, !1
          6      > JMPZ                                                     ~9, ->10
    7     7    >   FETCH_DIM_R                                      ~11     !1, !3
          8        ASSIGN_DIM                                               !0, !3
          9        OP_DATA                                                  ~11
    5    10    > > JMP                                                      ->3
         11    >   FE_FREE                                                  $6
   11    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.94 ms | 940 KiB | 16 Q