3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '{{ 1, $user:John Doe; $dgd:brat; }}'; preg_match_all("/(?=[^}]*}})(?(?!\w)\s+)\K([$]?[^[:punct:]]+)(?<!\s)/", $string, $matches); print_r($matches[1]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DWKZa
function name:  (null)
number of ops:  11
compiled vars:  !0 = $string, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%7B+1%2C+%24user%3AJohn+Doe%3B+%24dgd%3Abrat%3B+%7D%7D'
    4     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%28%3F%3D%5B%5E%7D%5D%2A%7D%7D%29%28%3F%28%3F%21%5Cw%29%5Cs%2B%29%5CK%28%5B%24%5D%3F%5B%5E%5B%3Apunct%3A%5D%5D%2B%29%28%3F%3C%21%5Cs%29%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    5     6        INIT_FCALL                                               'print_r'
          7        FETCH_DIM_R                                      ~4      !1, 1
          8        SEND_VAL                                                 ~4
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.24 ms | 1394 KiB | 17 Q