3v4l.org

run code in 300+ PHP versions simultaneously
<?php $req = 'Authorization: Digest nonce="53a193b54e06b",nc="0",cnonce="b059cf311750c47cf6baaf95b86260a6",qop="auth",username="Localstars",uri="http://sandbox.print.localstars.com/templates/d.1402656459.52/create.json",response="a7b7e42197b430c4359a4d6ed815c1b0"'; function http_digest_parse($txt) { // protect against missing data $needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1); $data = array(); $keys = implode('|', array_keys($needed_parts)); preg_match_all('@(' . $keys . ')=(?:([\'"])([^\2]+?)\2|([^\s,]+))@', $txt, $matches, PREG_SET_ORDER); foreach ($matches as $m) { $data[$m[1]] = $m[3] ? $m[3] : $m[4]; unset($needed_parts[$m[1]]); } return $needed_parts ? false : $data; } http_digest_parse($req);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NTfGY
function name:  (null)
number of ops:  5
compiled vars:  !0 = $req
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Authorization%3A+Digest+nonce%3D%2253a193b54e06b%22%2Cnc%3D%220%22%2Ccnonce%3D%22b059cf311750c47cf6baaf95b86260a6%22%2Cqop%3D%22auth%22%2Cusername%3D%22Localstars%22%2Curi%3D%22http%3A%2F%2Fsandbox.print.localstars.com%2Ftemplates%2Fd.1402656459.52%2Fcreate.json%22%2Cresponse%3D%22a7b7e42197b430c4359a4d6ed815c1b0%22'
   22     1        INIT_FCALL                                               'http_digest_parse'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function http_digest_parse:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 34
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 34
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 27
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 38
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/NTfGY
function name:  http_digest_parse
number of ops:  41
compiled vars:  !0 = $txt, !1 = $needed_parts, !2 = $data, !3 = $keys, !4 = $matches, !5 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    8     1        ASSIGN                                                   !1, <array>
    9     2        ASSIGN                                                   !2, <array>
   10     3        INIT_FCALL                                               'implode'
          4        SEND_VAL                                                 '%7C'
          5        INIT_FCALL                                               'array_keys'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $8      
          8        SEND_VAR                                                 $8
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !3, $9
   12    11        INIT_FCALL                                               'preg_match_all'
         12        CONCAT                                           ~11     '%40%28', !3
         13        CONCAT                                           ~12     ~11, '%29%3D%28%3F%3A%28%5B%27%22%5D%29%28%5B%5E%5C2%5D%2B%3F%29%5C2%7C%28%5B%5E%5Cs%2C%5D%2B%29%29%40'
         14        SEND_VAL                                                 ~12
         15        SEND_VAR                                                 !0
         16        SEND_REF                                                 !4
         17        SEND_VAL                                                 2
         18        DO_ICALL                                                 
   14    19      > FE_RESET_R                                       $14     !4, ->34
         20    > > FE_FETCH_R                                               $14, !5, ->34
   15    21    >   FETCH_DIM_R                                      ~15     !5, 1
         22        FETCH_DIM_R                                      ~17     !5, 3
         23      > JMPZ                                                     ~17, ->27
         24    >   FETCH_DIM_R                                      ~18     !5, 3
         25        QM_ASSIGN                                        ~19     ~18
         26      > JMP                                                      ->29
         27    >   FETCH_DIM_R                                      ~20     !5, 4
         28        QM_ASSIGN                                        ~19     ~20
         29    >   ASSIGN_DIM                                               !2, ~15
         30        OP_DATA                                                  ~19
   16    31        FETCH_DIM_R                                      ~21     !5, 1
         32        UNSET_DIM                                                !1, ~21
   14    33      > JMP                                                      ->20
         34    >   FE_FREE                                                  $14
   19    35      > JMPZ                                                     !1, ->38
         36    >   QM_ASSIGN                                        ~22     <false>
         37      > JMP                                                      ->39
         38    >   QM_ASSIGN                                        ~22     !2
         39    > > RETURN                                                   ~22
   20    40*     > RETURN                                                   null

End of function http_digest_parse

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.62 ms | 1403 KiB | 20 Q