3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = "Set-Cookie: Name=Value; expires=Tue, 01 Jan 2018 00:00:00 GMT; domain=.site.com; path=/; httponly"; if (preg_match_all('~(?:\G(?!^);|Set-Cookie:)\s*\K([^=\n]+)(?:=([^;\n]+))?~', $s, $matches)) { print_r(array_combine($matches[1],$matches[2])); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/cUpM7
function name:  (null)
number of ops:  17
compiled vars:  !0 = $s, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Set-Cookie%3A+Name%3DValue%3B+expires%3DTue%2C+01+Jan+2018+00%3A00%3A00+GMT%3B+domain%3D.site.com%3B+path%3D%2F%3B+httponly'
    4     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%7E%28%3F%3A%5CG%28%3F%21%5E%29%3B%7CSet-Cookie%3A%29%5Cs%2A%5CK%28%5B%5E%3D%5Cn%5D%2B%29%28%3F%3A%3D%28%5B%5E%3B%5Cn%5D%2B%29%29%3F%7E'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                         $3      
          6      > JMPZ                                                     $3, ->16
    5     7    >   INIT_FCALL                                               'print_r'
          8        INIT_FCALL                                               'array_combine'
          9        FETCH_DIM_R                                      ~4      !1, 1
         10        SEND_VAL                                                 ~4
         11        FETCH_DIM_R                                      ~5      !1, 2
         12        SEND_VAL                                                 ~5
         13        DO_ICALL                                         $6      
         14        SEND_VAR                                                 $6
         15        DO_ICALL                                                 
    6    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.63 ms | 1395 KiB | 19 Q