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]; $lookup = array_flip($needles); var_export( array_filter( $array, fn($v) => !key_exists(strstr(basename($v), '-', true), $lookup), ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/drOK2
function name:  (null)
number of ops:  16
compiled vars:  !0 = $array, !1 = $needles, !2 = $lookup
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1        ASSIGN                                                   !1, <array>
   15     2        INIT_FCALL                                               'array_flip'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !2, $5
   17     6        INIT_FCALL                                               'var_export'
   18     7        INIT_FCALL                                               'array_filter'
   19     8        SEND_VAR                                                 !0
   20     9        DECLARE_LAMBDA_FUNCTION                          ~7      [0]
         10        BIND_LEXICAL                                             ~7, !2
         11        SEND_VAL                                                 ~7
   18    12        DO_ICALL                                         $8      
   20    13        SEND_VAR                                                 $8
   17    14        DO_ICALL                                                 
   22    15      > 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/drOK2
function name:  {closure}
number of ops:  17
compiled vars:  !0 = $v, !1 = $lookup
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        INIT_FCALL                                               'key_exists'
          3        INIT_FCALL                                               'strstr'
          4        INIT_FCALL                                               'basename'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        SEND_VAL                                                 '-'
          9        SEND_VAL                                                 <true>
         10        DO_ICALL                                         $3      
         11        SEND_VAR                                                 $3
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $4      
         14        BOOL_NOT                                         ~5      $4
         15      > RETURN                                                   ~5
         16*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.67 ms | 1004 KiB | 19 Q