3v4l.org

run code in 500+ PHP versions simultaneously
<?php $input = "(Field1 = 'Val and ue1') and (Field2 = 'Valu or e2') or (Field3 = 'Value3')"; var_export(preg_split("~\) (and|or) \(~", trim($input, '()'), 0, PREG_SPLIT_DELIM_CAPTURE));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PHDig
function name:  (null)
number of ops:  12
compiled vars:  !0 = $input
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                                                   'var_export'
          2        INIT_FCALL                                                   'preg_split'
          3        SEND_VAL                                                     '%7E%5C%29+%28and%7Cor%29+%5C%28%7E'
          4        FRAMELESS_ICALL_2                trim                ~2      !0, '%28%29'
          5        SEND_VAL                                                     ~2
          6        SEND_VAL                                                     0
          7        SEND_VAL                                                     2
          8        DO_ICALL                                             $3      
          9        SEND_VAR                                                     $3
         10        DO_ICALL                                                     
         11      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
170.27 ms | 1901 KiB | 15 Q