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 (arraykey_exists($key_1, $array_2)) { $array_1[$key_1] = $array_2[$key_1]; } } prit_r($array_1);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 13
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/W1tUF
function name:  (null)
number of ops:  19
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, ->14
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->14
          4    >   ASSIGN                                                   !3, ~7
    6     5        INIT_FCALL_BY_NAME                                       'arraykey_exists'
          6        SEND_VAR_EX                                              !3
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0  $9      
          9      > JMPZ                                                     $9, ->13
    7    10    >   FETCH_DIM_R                                      ~11     !1, !3
         11        ASSIGN_DIM                                               !0, !3
         12        OP_DATA                                                  ~11
    5    13    > > JMP                                                      ->3
         14    >   FE_FREE                                                  $6
   11    15        INIT_FCALL_BY_NAME                                       'prit_r'
         16        SEND_VAR_EX                                              !0
         17        DO_FCALL                                      0          
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.76 ms | 1398 KiB | 13 Q