3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = gmdate('D, d M Y H:i:s \G\M\T'); $account_name = "inorbitalstorage"; $containername = "abc"; $account_key = "Z/jyC7ZLkc1j2nm7AeNRgkgjcpG7SCPOO8Cv52ImfHCyRCfyPmlvEmNNpBOyLje5QXuwVDsf3RKre7Kws3u2aA=="; $canonicalizedHeaders = "x-ms-date:$date\nx-ms-version:2014-02-14"; $canonicalizedResource = "/$account_name/"; $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}" ]; echo $signature;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LlgTk
function name:  (null)
number of ops:  83
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, 'inorbitalstorage'
    5     5        ASSIGN                                                   !2, 'abc'
    6     6        ASSIGN                                                   !3, 'Z%2FjyC7ZLkc1j2nm7AeNRgkgjcpG7SCPOO8Cv52ImfHCyRCfyPmlvEmNNpBOyLje5QXuwVDsf3RKre7Kws3u2aA%3D%3D'
    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                                     3  ~22     '%2F'
         12        ROPE_ADD                                      1  ~22     ~22, !1
         13        ROPE_END                                      2  ~21     ~22, '%2F'
         14        ASSIGN                                                   !5, ~21
   11    15        ASSIGN                                                   !6, <array>
   12    16        ASSIGN_DIM                                               !6
         17        OP_DATA                                                  'GET'
   13    18        ASSIGN_DIM                                               !6
         19        OP_DATA                                                  ''
   14    20        ASSIGN_DIM                                               !6
         21        OP_DATA                                                  ''
   15    22        ASSIGN_DIM                                               !6
         23        OP_DATA                                                  ''
   16    24        ASSIGN_DIM                                               !6
         25        OP_DATA                                                  ''
   17    26        ASSIGN_DIM                                               !6
         27        OP_DATA                                                  ''
   18    28        ASSIGN_DIM                                               !6
         29        OP_DATA                                                  ''
   19    30        ASSIGN_DIM                                               !6
         31        OP_DATA                                                  ''
   20    32        ASSIGN_DIM                                               !6
         33        OP_DATA                                                  ''
   21    34        ASSIGN_DIM                                               !6
         35        OP_DATA                                                  ''
   22    36        ASSIGN_DIM                                               !6
         37        OP_DATA                                                  ''
   23    38        ASSIGN_DIM                                               !6
         39        OP_DATA                                                  ''
   24    40        ASSIGN_DIM                                               !6
         41        OP_DATA                                                  !4
   25    42        ASSIGN_DIM                                               !6
         43        OP_DATA                                                  !5
   27    44        INIT_FCALL                                               'implode'
         45        SEND_VAL                                                 '%0A'
         46        SEND_VAR                                                 !6
         47        DO_ICALL                                         $40     
         48        ASSIGN                                                   !7, $40
   29    49        CONCAT                                           ~42     'SharedKey+', !1
         50        CONCAT                                           ~43     ~42, '%3A'
         51        INIT_FCALL                                               'base64_encode'
         52        INIT_FCALL                                               'hash_hmac'
         53        SEND_VAL                                                 'sha256'
         54        SEND_VAR                                                 !7
         55        INIT_FCALL                                               'base64_decode'
         56        SEND_VAR                                                 !3
         57        DO_ICALL                                         $44     
         58        SEND_VAR                                                 $44
         59        SEND_VAL                                                 <true>
         60        DO_ICALL                                         $45     
         61        SEND_VAR                                                 $45
         62        DO_ICALL                                         $46     
         63        CONCAT                                           ~47     ~43, $46
         64        ASSIGN                                                   !8, ~47
   31    65        CONCAT                                           ~49     'https%3A%2F%2F', !1
         66        CONCAT                                           ~50     ~49, '.blob.core.windows.net'
         67        ASSIGN                                                   !9, ~50
   32    68        CONCAT                                           ~52     !9, '%2F'
         69        CONCAT                                           ~53     ~52, !2
         70        CONCAT                                           ~54     ~53, '%3Frestype%3Dcontainer%26comp%3Dlist'
         71        ASSIGN                                                   !10, ~54
   35    72        NOP                                                      
         73        FAST_CONCAT                                      ~56     'x-ms-date%3A', !0
         74        INIT_ARRAY                                       ~57     ~56
   36    75        ADD_ARRAY_ELEMENT                                ~57     'x-ms-version%3A2014-02-14'
   37    76        ADD_ARRAY_ELEMENT                                ~57     'Accept%3Aapplication%2Fjson%3Bodata%3Dnometadata'
   38    77        NOP                                                      
         78        FAST_CONCAT                                      ~58     'Authorization%3A', !8
         79        ADD_ARRAY_ELEMENT                                ~57     ~58
   34    80        ASSIGN                                                   !11, ~57
   42    81        ECHO                                                     !8
         82      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.05 ms | 1405 KiB | 23 Q