3v4l.org

run code in 300+ PHP versions simultaneously
<?php $aa = array("1 2 3 4 5", "6 7 8 9 10", "11 12 13 14 15", "16 17 18 19 20", "21 22 23 24 25"); $bb = array("1 2", "6 7 8", "11 12 13 14", "16 17 18 19 20"); $exclude = []; foreach($bb as $b){ $exclude = array_merge($exclude, preg_grep("/^". preg_quote($b) . "/", $aa)); } $final = array_diff($aa, $exclude); print_r($final);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 20
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 20
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/XI9Jd
function name:  (null)
number of ops:  30
compiled vars:  !0 = $aa, !1 = $bb, !2 = $exclude, !3 = $b, !4 = $final
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                                       $8      !1, ->20
          4    > > FE_FETCH_R                                               $8, !3, ->20
    8     5    >   INIT_FCALL                                               'array_merge'
          6        SEND_VAR                                                 !2
          7        INIT_FCALL                                               'preg_grep'
          8        INIT_FCALL                                               'preg_quote'
          9        SEND_VAR                                                 !3
         10        DO_ICALL                                         $9      
         11        CONCAT                                           ~10     '%2F%5E', $9
         12        CONCAT                                           ~11     ~10, '%2F'
         13        SEND_VAL                                                 ~11
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $12     
         16        SEND_VAR                                                 $12
         17        DO_ICALL                                         $13     
         18        ASSIGN                                                   !2, $13
    7    19      > JMP                                                      ->4
         20    >   FE_FREE                                                  $8
   10    21        INIT_FCALL                                               'array_diff'
         22        SEND_VAR                                                 !0
         23        SEND_VAR                                                 !2
         24        DO_ICALL                                         $15     
         25        ASSIGN                                                   !4, $15
   12    26        INIT_FCALL                                               'print_r'
         27        SEND_VAR                                                 !4
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.79 ms | 1442 KiB | 18 Q