3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = <<<INP value that I {want}, vs value "I do {NOT} want". Let's make it {nested {this {time}}} And yes, it's even "{bullet-{proof}}" :) INP; preg_match_all('~("|\').*?\1(*SKIP)(*FAIL)|\{(?:[^{}]|(?R))*\}~', $input, $m); print_r($m[0]); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CkTYP
function name:  (null)
number of ops:  11
compiled vars:  !0 = $input, !1 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'value+that+I+%7Bwant%7D%2C+vs+value+%22I+do+%7BNOT%7D+want%22.%0ALet%27s+make+it+%7Bnested+%7Bthis+%7Btime%7D%7D%7D%0AAnd+yes%2C+it%27s+even+%22%7Bbullet-%7Bproof%7D%7D%22+%3A%29'
    8     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%7E%28%22%7C%27%29.%2A%3F%5C1%28%2ASKIP%29%28%2AFAIL%29%7C%5C%7B%28%3F%3A%5B%5E%7B%7D%5D%7C%28%3FR%29%29%2A%5C%7D%7E'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
   10     6        INIT_FCALL                                               'print_r'
          7        FETCH_DIM_R                                      ~4      !1, 0
          8        SEND_VAL                                                 ~4
          9        DO_ICALL                                                 
   11    10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.01 ms | 1394 KiB | 17 Q