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's {nested {this {time}}} And yes, it's even "{bullet-{proof}}" whats :) 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/SJiBW
function name:  (null)
number of ops:  13
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%27s+%7Bnested+%7Bthis+%7Btime%7D%7D%7D%0AAnd+yes%2C+it%27s+even+%22%7Bbullet-%7Bproof%7D%7D%22+whats+%3A%29'
    8     1        BEGIN_SILENCE                                    ~3      
          2        INIT_FCALL                                               'preg_match_all'
          3        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'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !1
          6        DO_ICALL                                                 
          7        END_SILENCE                                              ~3
   10     8        INIT_FCALL                                               'print_r'
          9        FETCH_DIM_R                                      ~5      !1, 0
         10        SEND_VAL                                                 ~5
         11        DO_ICALL                                                 
   11    12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.28 ms | 1385 KiB | 17 Q