3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ '../fish/cod/123709-sdfgsdfgvsadfg.pdf', '../fish/cod/123797-sdfgsdfg-sdfg-sdfgs-dfg-sd.pdf', '../fish/cod/123998-sdfgsdf-gsdf-gsd-fg-sdfg-.pdf', '../fish/cod/123998-sdfgsdfg-sdf-gsdfg-sdf-g.pdf', '../fish/cod/123998-sdfg.pdf', '../fish/cod/123998-sdfgsdfgsfdg-sdfg.pdf', '../fish/cod/124089-sdfgsdfg-sdfg-sdfg-.pdf', '../fish/cod/124153-sdfgsdfgsdf-gsdfg.pdf', ]; $needles = [123709, 123797, 124089, 124153]; $regex = '~\b(?:' . implode('|', array_map(fn($v) => preg_quote($v, '~'), $needles)) . ')\b~'; var_export(preg_grep($regex, $array, PREG_GREP_INVERT));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XoVBN
function name:  (null)
number of ops:  23
compiled vars:  !0 = $array, !1 = $needles, !2 = $regex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1        ASSIGN                                                   !1, <array>
   15     2        INIT_FCALL                                               'implode'
          3        SEND_VAL                                                 '%7C'
          4        INIT_FCALL                                               'array_map'
          5        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
          6        SEND_VAL                                                 ~5
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $6      
          9        SEND_VAR                                                 $6
         10        DO_ICALL                                         $7      
         11        CONCAT                                           ~8      '%7E%5Cb%28%3F%3A', $7
         12        CONCAT                                           ~9      ~8, '%29%5Cb%7E'
         13        ASSIGN                                                   !2, ~9
   16    14        INIT_FCALL                                               'var_export'
         15        INIT_FCALL                                               'preg_grep'
         16        SEND_VAR                                                 !2
         17        SEND_VAR                                                 !0
         18        SEND_VAL                                                 1
         19        DO_ICALL                                         $11     
         20        SEND_VAR                                                 $11
         21        DO_ICALL                                                 
         22      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XoVBN
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'preg_quote'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%7E'
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
          6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.26 ms | 1003 KiB | 18 Q