3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/(?:\[(?=[^][]*])(\w+)|\G(?!^))\h+(\w+)="([^"]+)"/'; $str = '[shortcode name param1="value1" param2="value2" param3="value3"] [specs product="test" category="body"] [pricelist keyword="216"] [specs product="test2" category="network"]'; preg_match_all($re, $str, $matches); print_r($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6FbEO
function name:  (null)
number of ops:  11
compiled vars:  !0 = $re, !1 = $str, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%28%3F%3A%5C%5B%28%3F%3D%5B%5E%5D%5B%5D%2A%5D%29%28%5Cw%2B%29%7C%5CG%28%3F%21%5E%29%29%5Ch%2B%28%5Cw%2B%29%3D%22%28%5B%5E%22%5D%2B%29%22%2F'
    4     1        ASSIGN                                                   !1, '%5Bshortcode+name+param1%3D%22value1%22+param2%3D%22value2%22+param3%3D%22value3%22%5D%0A%5Bspecs+product%3D%22test%22+category%3D%22body%22%5D%0A%5Bpricelist+keyword%3D%22216%22%5D%0A%5Bspecs+product%3D%22test2%22+category%3D%22network%22%5D'
    9     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
   10     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.42 ms | 1010 KiB | 15 Q