3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'I am flying from "Detroit to Vancouver" this to July'; $stopwords = array( "to", "anotherstopword", "andanother"); echo preg_replace('/"[^"\\\\]*(?>\\\\.[^"\\\\]*)*"(*SKIP)(*F)|\b(' . implode ('|', array_map('preg_quote', $stopwords)) . ')\b\h*/', '', $string);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e8Mee
function name:  (null)
number of ops:  19
compiled vars:  !0 = $string, !1 = $stopwords
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'I+am+flying+from+%22Detroit+to+Vancouver%22+this+to+July'
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'preg_replace'
          3        INIT_FCALL                                               'implode'
          4        SEND_VAL                                                 '%7C'
          5        INIT_FCALL                                               'array_map'
          6        SEND_VAL                                                 'preg_quote'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                         $5      
         11        CONCAT                                           ~6      '%2F%22%5B%5E%22%5C%5C%5D%2A%28%3F%3E%5C%5C.%5B%5E%22%5C%5C%5D%2A%29%2A%22%28%2ASKIP%29%28%2AF%29%7C%5Cb%28', $5
         12        CONCAT                                           ~7      ~6, '%29%5Cb%5Ch%2A%2F'
         13        SEND_VAL                                                 ~7
         14        SEND_VAL                                                 ''
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $8      
         17        ECHO                                                     $8
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.04 ms | 1012 KiB | 16 Q