3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array("te","1","we","no","1","sdfsdf","Resolved");//old data $array2 = array("another","0","we","no","0","sdfsdf","Unresolved"); //new updated data $newArray = array(); foreach($array2 as $k=>$v){ $value = $v; $key = $k; //if(!in_array($value,$array1)){ if(array_key_exists($key,$array1)){ if(!in_array($value,$array1)){ echo $value.'<br/>'; $newArray[$key] = $value; } } //} } print_r($newArray);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 21
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 21
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 20
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 20
Branch analysis from position: 20
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/9Yv37
function name:  (null)
number of ops:  26
compiled vars:  !0 = $array1, !1 = $array2, !2 = $newArray, !3 = $v, !4 = $k, !5 = $value, !6 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, <array>
    6     3      > FE_RESET_R                                       $10     !1, ->21
          4    > > FE_FETCH_R                                       ~11     $10, !3, ->21
          5    >   ASSIGN                                                   !4, ~11
    7     6        ASSIGN                                                   !5, !3
    8     7        ASSIGN                                                   !6, !4
   11     8        ARRAY_KEY_EXISTS                                         !6, !0
          9      > JMPZ                                                     ~15, ->20
   12    10    >   INIT_FCALL                                               'in_array'
         11        SEND_VAR                                                 !5
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $16     
         14        BOOL_NOT                                         ~17     $16
         15      > JMPZ                                                     ~17, ->20
   13    16    >   CONCAT                                           ~18     !5, '%3Cbr%2F%3E'
         17        ECHO                                                     ~18
   14    18        ASSIGN_DIM                                               !2, !6
         19        OP_DATA                                                  !5
    6    20    > > JMP                                                      ->4
         21    >   FE_FREE                                                  $10
   20    22        INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !2
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.23 ms | 1388 KiB | 17 Q