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)){ echo $value.'<br/>'; $newArray[] = $value; }else{ //echo $value.'<br/>'; } } } print_r($newArray);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 22
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 22
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 21
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 21
Branch analysis from position: 21
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/mCouD
function name:  (null)
number of ops:  27
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, ->22
          4    > > FE_FETCH_R                                       ~11     $10, !3, ->22
          5    >   ASSIGN                                                   !4, ~11
    7     6        ASSIGN                                                   !5, !3
    8     7        ASSIGN                                                   !6, !4
   10     8        INIT_FCALL                                               'in_array'
          9        SEND_VAR                                                 !5
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $15     
         12        BOOL_NOT                                         ~16     $15
         13      > JMPZ                                                     ~16, ->21
   11    14    >   ARRAY_KEY_EXISTS                                         !6, !0
         15      > JMPZ                                                     ~17, ->21
   12    16    >   CONCAT                                           ~18     !5, '%3Cbr%2F%3E'
         17        ECHO                                                     ~18
   13    18        ASSIGN_DIM                                               !2
         19        OP_DATA                                                  !5
         20      > JMP                                                      ->21
    6    21    > > JMP                                                      ->4
         22    >   FE_FREE                                                  $10
   20    23        INIT_FCALL                                               'print_r'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.47 ms | 1388 KiB | 17 Q