3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
198.77 ms | 2149 KiB | 13 Q