3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['this is', 'array nr array', 'an array', 'test no array']; $stop = ['diens', 'dezer', 'dezes', 'nr', 'no', 'wij', 'ik', 'jij']; $pattern = '/('.join(')|(', $stop).')/'; $array = array_filter($array, function($x) use ($pattern) { return !preg_match($pattern, $x); }); var_dump($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1k3Y3
function name:  (null)
number of ops:  20
compiled vars:  !0 = $array, !1 = $stop, !2 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2        INIT_FCALL                                               'join'
          3        SEND_VAL                                                 '%29%7C%28'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        CONCAT                                           ~6      '%2F%28', $5
          7        CONCAT                                           ~7      ~6, '%29%2F'
          8        ASSIGN                                                   !2, ~7
    6     9        INIT_FCALL                                               'array_filter'
         10        SEND_VAR                                                 !0
         11        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F1k3Y3%3A6%240'
         12        BIND_LEXICAL                                             ~9, !2
    9    13        SEND_VAL                                                 ~9
         14        DO_ICALL                                         $10     
    6    15        ASSIGN                                                   !0, $10
   11    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F1k3Y3%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1k3Y3
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $x, !1 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    8     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        BOOL_NOT                                         ~3      $2
          7      > RETURN                                                   ~3
    9     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F1k3Y3%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.11 ms | 1396 KiB | 21 Q