3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ["!qwerty","sapien", "!Bart", "!qwerty", "aa!bb"]; $filtered = preg_grep("/^\!.*$/", $arr); Var_dump($filtered); var_dump(array_diff($arr, $filtered));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uj4Gb
function name:  (null)
number of ops:  17
compiled vars:  !0 = $arr, !1 = $filtered
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'preg_grep'
          2        SEND_VAL                                                 '%2F%5E%5C%21.%2A%24%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    7     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    8     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'array_diff'
         11        SEND_VAR                                                 !0
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $6      
         14        SEND_VAR                                                 $6
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.15 ms | 1001 KiB | 16 Q