3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data = <<<DATA this will = ({match1}) this should = not ({match2}) ({match3}) DATA; $pattern = "~[^\w\s]\h*\K\({\w+}\)~"; preg_match_all($pattern, $data, $matches); print_r($matches[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bpsLI
function name:  (null)
number of ops:  12
compiled vars:  !0 = $data, !1 = $pattern, !2 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'this+will+%3D+%28%7Bmatch1%7D%29%0Athis+should+%3D+not+%28%7Bmatch2%7D%29%0A%28%7Bmatch3%7D%29'
    9     1        ASSIGN                                                       !1, '%7E%5B%5E%5Cw%5Cs%5D%5Ch%2A%5CK%5C%28%7B%5Cw%2B%7D%5C%29%7E'
   10     2        INIT_FCALL                                                   'preg_match_all'
          3        SEND_VAR                                                     !1
          4        SEND_VAR                                                     !0
          5        SEND_REF                                                     !2
          6        DO_ICALL                                                     
   11     7        INIT_FCALL                                                   'print_r'
          8        FETCH_DIM_R                                          ~6      !2, 0
          9        SEND_VAL                                                     ~6
         10        DO_ICALL                                                     
         11      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
128.43 ms | 478 KiB | 9 Q