3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $query = "-exclude -\"exclude phrase\" \"phrase 1\" keyword +k:v -k2:v2 +\"q kw\":2"; $ATOM_REGEX = '"[^"]+"|[^"\s]+'; "?> atomic group"; preg_match_all("/(?>(?P<flag>[-+])?(?P<key>$ATOM_REGEX:)?(?P<value>$ATOM_REGEX))/", $query, $match, PREG_SET_ORDER); print_r($match);
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/NO9ZO
function name:  (null)
number of ops:  17
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'
   6     2        INIT_FCALL                                               'preg_match_all'
         3        ROPE_INIT                                     5  ~6      '%2F%28%3F%3E%28%3FP%3Cflag%3E%5B-%2B%5D%29%3F%28%3FP%3Ckey%3E'
         4        ROPE_ADD                                      1  ~6      ~6, !1
         5        ROPE_ADD                                      2  ~6      ~6, '%3A%29%3F%28%3FP%3Cvalue%3E'
         6        ROPE_ADD                                      3  ~6      ~6, !1
         7        ROPE_END                                      4  ~5      ~6, '%29%29%2F'
         8        SEND_VAL                                                 ~5
         9        SEND_VAR                                                 !0
        10        SEND_REF                                                 !2
        11        SEND_VAL                                                 2
        12        DO_ICALL                                                 
   7    13        INIT_FCALL                                               'print_r'
        14        SEND_VAR                                                 !2
        15        DO_ICALL                                                 
        16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0