3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array ("apple","banana","papaya","watermelon","avocado"); $array2 = array ("apple","avocado"); $final_result = array(); foreach($array1 as $value){ if(!in_array($value, $array2)){ $final_result[] = $value; } } print_r($final_result); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 14
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
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/D8SOC
function name:  (null)
number of ops:  19
compiled vars:  !0 = $array1, !1 = $array2, !2 = $final_result, !3 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, <array>
    7     3      > FE_RESET_R                                       $7      !0, ->14
          4    > > FE_FETCH_R                                               $7, !3, ->14
    9     5    >   INIT_FCALL                                               'in_array'
          6        SEND_VAR                                                 !3
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $8      
          9        BOOL_NOT                                         ~9      $8
         10      > JMPZ                                                     ~9, ->13
   11    11    >   ASSIGN_DIM                                               !2
         12        OP_DATA                                                  !3
    7    13    > > JMP                                                      ->4
         14    >   FE_FREE                                                  $7
   16    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
   18    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.04 ms | 1395 KiB | 17 Q