3v4l.org

run code in 300+ 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:  15
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        INIT_FCALL                                               'trim'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 '%28%29'
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        SEND_VAL                                                 0
         10        SEND_VAL                                                 2
         11        DO_ICALL                                         $3      
         12        SEND_VAR                                                 $3
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.64 ms | 1006 KiB | 16 Q