3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = [ 0 => "test zero", 1 => "test one", 2 => "test two", 3 => "test three" ]; $arr2 = [ 1 => "test four", 5 => "test five", 3 => "test six", 4 => "test seven" ]; $i=min(array_keys($arr1)); foreach($arr2 as $k=>$val) { if(array_key_exists($k,$arr1)) { $arr1[$k].='\N, '.$val; } } var_dump($arr1);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 18
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 18
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 17
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/cK95W
function name:  (null)
number of ops:  23
compiled vars:  !0 = $arr1, !1 = $arr2, !2 = $i, !3 = $val, !4 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   18     2        INIT_FCALL                                               'min'
          3        INIT_FCALL                                               'array_keys'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $7      
          6        SEND_VAR                                                 $7
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !2, $8
   19     9      > FE_RESET_R                                       $10     !1, ->18
         10    > > FE_FETCH_R                                       ~11     $10, !3, ->18
         11    >   ASSIGN                                                   !4, ~11
   21    12        ARRAY_KEY_EXISTS                                         !4, !0
         13      > JMPZ                                                     ~13, ->17
   23    14    >   CONCAT                                           ~15     '%5CN%2C+', !3
         15        ASSIGN_DIM_OP                .=               8          !0, !4
         16        OP_DATA                                                  ~15
   19    17    > > JMP                                                      ->10
         18    >   FE_FREE                                                  $10
   28    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159 ms | 1395 KiB | 19 Q