3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "@keyframes animationName1{0%{opacity: 0}100%{opacity:1}}div{opacity:0}@keyframes animationName2{0%{opacity: 0}100%{opacity:1}}"; $rx = '~([^{}]+)({(?:[^{}]++|(\g<2>))*})~'; if (preg_match_all($rx, $text, $m)) { print_r($m[0]); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/MCsep
function name:  (null)
number of ops:  13
compiled vars:  !0 = $text, !1 = $rx, !2 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%40keyframes+animationName1%7B0%25%7Bopacity%3A+0%7D100%25%7Bopacity%3A1%7D%7Ddiv%7Bopacity%3A0%7D%40keyframes+animationName2%7B0%25%7Bopacity%3A+0%7D100%25%7Bopacity%3A1%7D%7D'
    4     1        ASSIGN                                                   !1, '%7E%28%5B%5E%7B%7D%5D%2B%29%28%7B%28%3F%3A%5B%5E%7B%7D%5D%2B%2B%7C%28%5Cg%3C2%3E%29%29%2A%7D%29%7E'
    5     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        DO_ICALL                                         $5      
          7      > JMPZ                                                     $5, ->12
    6     8    >   INIT_FCALL                                               'print_r'
          9        FETCH_DIM_R                                      ~6      !2, 0
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                                 
    7    12    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.49 ms | 1002 KiB | 15 Q