3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/(?:[^\s()":]*:)?"[^"]+"|[^\s()]+|[()]/m'; $str = '+test +word any -sampe (+toto +titi "generic test") -column:"test this" (+data id:1234)'; preg_match_all($re, $str, $matches); print_r($matches[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T4ib4
function name:  (null)
number of ops:  12
compiled vars:  !0 = $re, !1 = $str, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%28%3F%3A%5B%5E%5Cs%28%29%22%3A%5D%2A%3A%29%3F%22%5B%5E%22%5D%2B%22%7C%5B%5E%5Cs%28%29%5D%2B%7C%5B%28%29%5D%2Fm'
    4     1        ASSIGN                                                   !1, '%2Btest+%2Bword+any+-sampe+%28%2Btoto+%2Btiti+%22generic+test%22%29+-column%3A%22test+this%22+%28%2Bdata+id%3A1234%29'
    5     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'print_r'
          8        FETCH_DIM_R                                      ~6      !2, 0
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.2 ms | 1005 KiB | 15 Q