3v4l.org

run code in 500+ PHP versions simultaneously
<?php $re = '/(\w+(?:-\w+)*)=(?|"((?:[^"]+|(?<=\\\\)")++)"|([^"\s]+))/'; $str = 'add name=100YER on-login=":do {:put \\"a\\";} on-error={};" rate-limit=256k/512k'; preg_match_all($re, $str, $matches); $result = array_combine($matches[1], $matches[2]); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ht0CG
function name:  (null)
number of ops:  18
compiled vars:  !0 = $re, !1 = $str, !2 = $matches, !3 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%2F%28%5Cw%2B%28%3F%3A-%5Cw%2B%29%2A%29%3D%28%3F%7C%22%28%28%3F%3A%5B%5E%22%5D%2B%7C%28%3F%3C%3D%5C%5C%29%22%29%2B%2B%29%22%7C%28%5B%5E%22%5Cs%5D%2B%29%29%2F'
    4     1        ASSIGN                                                       !1, 'add+name%3D100YER+on-login%3D%22%3Ado+%7B%3Aput+%5C%22a%5C%22%3B%7D+on-error%3D%7B%7D%3B%22+rate-limit%3D256k%2F512k'
    6     2        INIT_FCALL                                                   'preg_match_all'
          3        SEND_VAR                                                     !0
          4        SEND_VAR                                                     !1
          5        SEND_REF                                                     !2
          6        DO_ICALL                                                     
    7     7        INIT_FCALL                                                   'array_combine'
          8        FETCH_DIM_R                                          ~7      !2, 1
          9        SEND_VAL                                                     ~7
         10        FETCH_DIM_R                                          ~8      !2, 2
         11        SEND_VAL                                                     ~8
         12        DO_ICALL                                             $9      
         13        ASSIGN                                                       !3, $9
    8    14        INIT_FCALL                                                   'print_r'
         15        SEND_VAR                                                     !3
         16        DO_ICALL                                                     
         17      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.06 ms | 2126 KiB | 16 Q