3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "(Field1 = 'Val and ue1') and (Field2 = 'Valu or e2') or (Field3 = 'Value3')"; preg_match_all("~\((\S+ = '.*?')\) ?(or|and)?~", $input, $m, PREG_SET_ORDER); print_r($m);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UEmn0
function name:  (null)
number of ops:  11
compiled vars:  !0 = $input, !1 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%28Field1+%3D+%27Val+and+ue1%27%29+and+%28Field2+%3D+%27Valu+or+e2%27%29+or+%28Field3+%3D+%27Value3%27%29'
    4     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%7E%5C%28%28%5CS%2B+%3D+%27.%2A%3F%27%29%5C%29+%3F%28or%7Cand%29%3F%7E'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        SEND_VAL                                                 2
          6        DO_ICALL                                                 
    5     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.12 ms | 1004 KiB | 15 Q