3v4l.org

run code in 300+ PHP versions simultaneously
<?php $query = "-exclude -\"exclude phrase\" \"phrase 1\" keyword +k:v -k2:v2 +\"q kw\":2"; $ATOM_REGEX = '"[^"]+"|[^"\s]+'; $match = preg_match_all("/([-+])?($ATOM_REGEX:)?($ATOM_REGEX)/", $query); print_r($match);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VsuSG
function name:  (null)
number of ops:  16
compiled vars:  !0 = $query, !1 = $ATOM_REGEX, !2 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '-exclude+-%22exclude+phrase%22+%22phrase+1%22+keyword+%2Bk%3Av+-k2%3Av2+%2B%22q+kw%22%3A2'
    4     1        ASSIGN                                                   !1, '%22%5B%5E%22%5D%2B%22%7C%5B%5E%22%5Cs%5D%2B'
    5     2        INIT_FCALL                                               'preg_match_all'
          3        ROPE_INIT                                     5  ~6      '%2F%28%5B-%2B%5D%29%3F%28'
          4        ROPE_ADD                                      1  ~6      ~6, !1
          5        ROPE_ADD                                      2  ~6      ~6, '%3A%29%3F%28'
          6        ROPE_ADD                                      3  ~6      ~6, !1
          7        ROPE_END                                      4  ~5      ~6, '%29%2F'
          8        SEND_VAL                                                 ~5
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !2, $9
    6    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.31 ms | 1394 KiB | 17 Q