3v4l.org

run code in 300+ PHP versions simultaneously
<?php $k=0; $array1=Array(1,2,3); $array2=Array(1,3,5); $array3=Array(); for($i=0;$i<count($array1);$i++) { if(!in_array($array1[$i],$array2)) { if(!in_array($array1[$i],$array3)) { $array3[$k]=$array1[$i]; $k++; } } } for($j=0;$j<count($array2);$j++) { if(!in_array($array2[$j],$array1)) { if(!in_array($array2[$j],$array3)) { $array3[$k]=$array2[$j]; $k++; } } } print_r($array3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 6
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
2 jumps found. (Code = 44) Position 1 = 52, Position 2 = 30
Branch analysis from position: 52
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 48
Branch analysis from position: 37
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 48
Branch analysis from position: 44
2 jumps found. (Code = 44) Position 1 = 52, Position 2 = 30
Branch analysis from position: 52
Branch analysis from position: 30
Branch analysis from position: 48
Branch analysis from position: 48
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 24
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 24
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 6
Branch analysis from position: 28
Branch analysis from position: 6
Branch analysis from position: 24
Branch analysis from position: 24
filename:       /in/rPCNe
function name:  (null)
number of ops:  56
compiled vars:  !0 = $k, !1 = $array1, !2 = $array2, !3 = $array3, !4 = $i, !5 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
    4     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, <array>
    6     3        ASSIGN                                                   !3, <array>
    8     4        ASSIGN                                                   !4, 0
          5      > JMP                                                      ->25
   10     6    >   INIT_FCALL                                               'in_array'
          7        FETCH_DIM_R                                      ~11     !1, !4
          8        SEND_VAL                                                 ~11
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $12     
         11        BOOL_NOT                                         ~13     $12
         12      > JMPZ                                                     ~13, ->24
   12    13    >   INIT_FCALL                                               'in_array'
         14        FETCH_DIM_R                                      ~14     !1, !4
         15        SEND_VAL                                                 ~14
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $15     
         18        BOOL_NOT                                         ~16     $15
         19      > JMPZ                                                     ~16, ->24
   14    20    >   FETCH_DIM_R                                      ~18     !1, !4
         21        ASSIGN_DIM                                               !3, !0
         22        OP_DATA                                                  ~18
   15    23        PRE_INC                                                  !0
    8    24    >   PRE_INC                                                  !4
         25    >   COUNT                                            ~21     !1
         26        IS_SMALLER                                               !4, ~21
         27      > JMPNZ                                                    ~22, ->6
   20    28    >   ASSIGN                                                   !5, 0
         29      > JMP                                                      ->49
   22    30    >   INIT_FCALL                                               'in_array'
         31        FETCH_DIM_R                                      ~24     !2, !5
         32        SEND_VAL                                                 ~24
         33        SEND_VAR                                                 !1
         34        DO_ICALL                                         $25     
         35        BOOL_NOT                                         ~26     $25
         36      > JMPZ                                                     ~26, ->48
   24    37    >   INIT_FCALL                                               'in_array'
         38        FETCH_DIM_R                                      ~27     !2, !5
         39        SEND_VAL                                                 ~27
         40        SEND_VAR                                                 !3
         41        DO_ICALL                                         $28     
         42        BOOL_NOT                                         ~29     $28
         43      > JMPZ                                                     ~29, ->48
   26    44    >   FETCH_DIM_R                                      ~31     !2, !5
         45        ASSIGN_DIM                                               !3, !0
         46        OP_DATA                                                  ~31
   27    47        PRE_INC                                                  !0
   20    48    >   PRE_INC                                                  !5
         49    >   COUNT                                            ~34     !2
         50        IS_SMALLER                                               !5, ~34
         51      > JMPNZ                                                    ~35, ->30
   32    52    >   INIT_FCALL                                               'print_r'
         53        SEND_VAR                                                 !3
         54        DO_ICALL                                                 
         55      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.21 ms | 1400 KiB | 17 Q