3v4l.org

run code in 500+ PHP versions simultaneously
<?php $re = '/(?<!\\\\)([\'"])(?:(?!(?:\1|\\\\)).|\\\\.)*+\1(*SKIP)(*FAIL)|\h+/m'; $str = 'abc | xx ?? "1 x \\\' 3" d e f \\\' y " 5 \\\' x yz abc | xx ?? \'1 x \\" 3\' d e f \\\' y " 5 \\\' x yz '; $result = preg_replace($re, '', $str); echo $result;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OQen6
function name:  (null)
number of ops:  7
compiled vars:  !0 = $re, !1 = $str, !2 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%2F%28%3F%3C%21%5C%5C%29%28%5B%27%22%5D%29%28%3F%3A%28%3F%21%28%3F%3A%5C1%7C%5C%5C%29%29.%7C%5C%5C.%29%2A%2B%5C1%28%2ASKIP%29%28%2AFAIL%29%7C%5Ch%2B%2Fm'
    4     1        ASSIGN                                                       !1, 'abc+%7C+xx+%3F%3F+++%221+x+%5C%27+3%22+d+e+f+%5C%27+y+%22+5+%5C%27+x+yz%0A%0Aabc+%7C+xx+%3F%3F+++%271+x+%5C%22+3%27+d+e+f+%5C%27+y+%22+5+%5C%27+x+yz%0A'
    9     2        FRAMELESS_ICALL_3                preg_replace        ~5      !0, ''
          3        OP_DATA                                                      !1
          4        ASSIGN                                                       !2, ~5
   11     5        ECHO                                                         !2
   12     6      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
186.05 ms | 2121 KiB | 13 Q