3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = gmdate('D, d M Y H:i:s \G\M\T'); $account_name = "xyz"; $containername = "abc"; $account_key = "asdf"; $canonicalizedHeaders = "x-ms-date:$date\nx-ms-version:2014-02-14"; $canonicalizedResource = "/$account_name/$containername\ncomp:list\nrestype:container"; $arraysign = array(); $arraysign[] = 'GET'; /*HTTP Verb*/ $arraysign[] = ''; /*Content-Encoding*/ $arraysign[] = ''; /*Content-Language*/ $arraysign[] = ''; /*Content-Length (include value when zero)*/ $arraysign[] = ''; /*Content-MD5*/ $arraysign[] = ''; /*Content-Type*/ $arraysign[] = ''; /*Date*/ $arraysign[] = ''; /*If-Modified-Since */ $arraysign[] = ''; /*If-Match*/ $arraysign[] = ''; /*If-None-Match*/ $arraysign[] = ''; /*If-Unmodified-Since*/ $arraysign[] = ''; /*Range*/ $arraysign[] = $canonicalizedHeaders; /*CanonicalizedHeaders*/ $arraysign[] = $canonicalizedResource; /*CanonicalizedResource*/ $stringtosign = implode("\n", $arraysign); $signature = 'SharedKey'.' '.$account_name.':'.base64_encode(hash_hmac('sha256', $stringtosign, base64_decode($account_key), true)); $endpoint = 'https://'.$account_name.'.blob.core.windows.net'; $url = $endpoint.'/'.$containername.'?restype=container&comp=list'; $headers = [ "x-ms-date:{$date}", 'x-ms-version:2014-02-14', 'Accept:application/json;odata=nometadata', "Authorization:{$signature}" ];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BUoJq
function name:  (null)
number of ops:  84
compiled vars:  !0 = $date, !1 = $account_name, !2 = $containername, !3 = $account_key, !4 = $canonicalizedHeaders, !5 = $canonicalizedResource, !6 = $arraysign, !7 = $stringtosign, !8 = $signature, !9 = $endpoint, !10 = $url, !11 = $headers
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'gmdate'
          1        SEND_VAL                                                 'D%2C+d+M+Y+H%3Ai%3As+%5CG%5CM%5CT'
          2        DO_ICALL                                         $12     
          3        ASSIGN                                                   !0, $12
    4     4        ASSIGN                                                   !1, 'xyz'
    5     5        ASSIGN                                                   !2, 'abc'
    6     6        ASSIGN                                                   !3, 'asdf'
    8     7        ROPE_INIT                                     3  ~18     'x-ms-date%3A'
          8        ROPE_ADD                                      1  ~18     ~18, !0
          9        ROPE_END                                      2  ~17     ~18, '%0Ax-ms-version%3A2014-02-14'
         10        ASSIGN                                                   !4, ~17
    9    11        ROPE_INIT                                     5  ~22     '%2F'
         12        ROPE_ADD                                      1  ~22     ~22, !1
         13        ROPE_ADD                                      2  ~22     ~22, '%2F'
         14        ROPE_ADD                                      3  ~22     ~22, !2
         15        ROPE_END                                      4  ~21     ~22, '%0Acomp%3Alist%0Arestype%3Acontainer'
         16        ASSIGN                                                   !5, ~21
   11    17        ASSIGN                                                   !6, <array>
   12    18        ASSIGN_DIM                                               !6
         19        OP_DATA                                                  'GET'
   13    20        ASSIGN_DIM                                               !6
         21        OP_DATA                                                  ''
   14    22        ASSIGN_DIM                                               !6
         23        OP_DATA                                                  ''
   15    24        ASSIGN_DIM                                               !6
         25        OP_DATA                                                  ''
   16    26        ASSIGN_DIM                                               !6
         27        OP_DATA                                                  ''
   17    28        ASSIGN_DIM                                               !6
         29        OP_DATA                                                  ''
   18    30        ASSIGN_DIM                                               !6
         31        OP_DATA                                                  ''
   19    32        ASSIGN_DIM                                               !6
         33        OP_DATA                                                  ''
   20    34        ASSIGN_DIM                                               !6
         35        OP_DATA                                                  ''
   21    36        ASSIGN_DIM                                               !6
         37        OP_DATA                                                  ''
   22    38        ASSIGN_DIM                                               !6
         39        OP_DATA                                                  ''
   23    40        ASSIGN_DIM                                               !6
         41        OP_DATA                                                  ''
   24    42        ASSIGN_DIM                                               !6
         43        OP_DATA                                                  !4
   25    44        ASSIGN_DIM                                               !6
         45        OP_DATA                                                  !5
   27    46        INIT_FCALL                                               'implode'
         47        SEND_VAL                                                 '%0A'
         48        SEND_VAR                                                 !6
         49        DO_ICALL                                         $41     
         50        ASSIGN                                                   !7, $41
   29    51        CONCAT                                           ~43     'SharedKey+', !1
         52        CONCAT                                           ~44     ~43, '%3A'
         53        INIT_FCALL                                               'base64_encode'
         54        INIT_FCALL                                               'hash_hmac'
         55        SEND_VAL                                                 'sha256'
         56        SEND_VAR                                                 !7
         57        INIT_FCALL                                               'base64_decode'
         58        SEND_VAR                                                 !3
         59        DO_ICALL                                         $45     
         60        SEND_VAR                                                 $45
         61        SEND_VAL                                                 <true>
         62        DO_ICALL                                         $46     
         63        SEND_VAR                                                 $46
         64        DO_ICALL                                         $47     
         65        CONCAT                                           ~48     ~44, $47
         66        ASSIGN                                                   !8, ~48
   31    67        CONCAT                                           ~50     'https%3A%2F%2F', !1
         68        CONCAT                                           ~51     ~50, '.blob.core.windows.net'
         69        ASSIGN                                                   !9, ~51
   32    70        CONCAT                                           ~53     !9, '%2F'
         71        CONCAT                                           ~54     ~53, !2
         72        CONCAT                                           ~55     ~54, '%3Frestype%3Dcontainer%26comp%3Dlist'
         73        ASSIGN                                                   !10, ~55
   35    74        NOP                                                      
         75        FAST_CONCAT                                      ~57     'x-ms-date%3A', !0
         76        INIT_ARRAY                                       ~58     ~57
   36    77        ADD_ARRAY_ELEMENT                                ~58     'x-ms-version%3A2014-02-14'
   37    78        ADD_ARRAY_ELEMENT                                ~58     'Accept%3Aapplication%2Fjson%3Bodata%3Dnometadata'
   38    79        NOP                                                      
         80        FAST_CONCAT                                      ~59     'Authorization%3A', !8
         81        ADD_ARRAY_ELEMENT                                ~58     ~59
   34    82        ASSIGN                                                   !11, ~58
   39    83      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.46 ms | 1400 KiB | 23 Q