3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stopwords = "bed|badword|bud"; $lines = [ 'Good morning everyone', 'Make your bed and brush your hair', 'Finish your breakfast', 'Do not say badwords', 'Will you be my buddy?', ]; var_export(preg_grep("#$stopwords#", $lines));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UmW6d
function name:  (null)
number of ops:  13
compiled vars:  !0 = $stopwords, !1 = $lines
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'bed%7Cbadword%7Cbud'
    5     1        ASSIGN                                                   !1, <array>
   13     2        INIT_FCALL                                               'var_export'
          3        INIT_FCALL                                               'preg_grep'
          4        ROPE_INIT                                     3  ~5      '%23'
          5        ROPE_ADD                                      1  ~5      ~5, !0
          6        ROPE_END                                      2  ~4      ~5, '%23'
          7        SEND_VAL                                                 ~4
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $7      
         10        SEND_VAR                                                 $7
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.21 ms | 997 KiB | 15 Q