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) \(~", $input, 0, PREG_SPLIT_NO_EMPTY|PREG_SPLIT_DELIM_CAPTURE));

preferences:
118 ms | 405 KiB | 5 Q