3v4l.org

run code in 300+ 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:  8
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        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%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'
          3        SEND_VAL                                                 ''
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ECHO                                                     $2
          7      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.26 ms | 1000 KiB | 14 Q