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/blL4I
function name:  (null)
number of ops:  82
compiled vars:  !0 = $date, !1 = $account_name, !2 = $account_key, !3 = $canonicalizedHeaders, !4 = $canonicalizedResource, !5 = $arraysign, !6 = $stringtosign, !7 = $signature, !8 = $endpoint, !9 = $url, !10 = $containername, !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'
    6     5        ASSIGN                                                   !2, 'Z%2FjyC7ZLkc1j2nm7AeNRgkgjcpG7SCPOO8Cv52ImfHCyRCfyPmlvEmNNpBOyLje5QXuwVDsf3RKre7Kws3u2aA%3D%3D'
    8     6        ROPE_INIT                                     3  ~17     'x-ms-date%3A'
          7        ROPE_ADD                                      1  ~17     ~17, !0
          8        ROPE_END                                      2  ~16     ~17, '%0Ax-ms-version%3A2014-02-14'
          9        ASSIGN                                                   !3, ~16
    9    10        ROPE_INIT                                     3  ~21     '%2F'
         11        ROPE_ADD                                      1  ~21     ~21, !1
         12        ROPE_END                                      2  ~20     ~21, '%2F'
         13        ASSIGN                                                   !4, ~20
   11    14        ASSIGN                                                   !5, <array>
   12    15        ASSIGN_DIM                                               !5
         16        OP_DATA                                                  'GET'
   13    17        ASSIGN_DIM                                               !5
         18        OP_DATA                                                  ''
   14    19        ASSIGN_DIM                                               !5
         20        OP_DATA                                                  ''
   15    21        ASSIGN_DIM                                               !5
         22        OP_DATA                                                  ''
   16    23        ASSIGN_DIM                                               !5
         24        OP_DATA                                                  ''
   17    25        ASSIGN_DIM                                               !5
         26        OP_DATA                                                  ''
   18    27        ASSIGN_DIM                                               !5
         28        OP_DATA                                                  ''
   19    29        ASSIGN_DIM                                               !5
         30        OP_DATA                                                  ''
   20    31        ASSIGN_DIM                                               !5
         32        OP_DATA                                                  ''
   21    33        ASSIGN_DIM                                               !5
         34        OP_DATA                                                  ''
   22    35        ASSIGN_DIM                                               !5
         36        OP_DATA                                                  ''
   23    37        ASSIGN_DIM                                               !5
         38        OP_DATA                                                  ''
   24    39        ASSIGN_DIM                                               !5
         40        OP_DATA                                                  !3
   25    41        ASSIGN_DIM                                               !5
         42        OP_DATA                                                  !4
   27    43        INIT_FCALL                                               'implode'
         44        SEND_VAL                                                 '%0A'
         45        SEND_VAR                                                 !5
         46        DO_ICALL                                         $39     
         47        ASSIGN                                                   !6, $39
   29    48        CONCAT                                           ~41     'SharedKey+', !1
         49        CONCAT                                           ~42     ~41, '%3A'
         50        INIT_FCALL                                               'base64_encode'
         51        INIT_FCALL                                               'hash_hmac'
         52        SEND_VAL                                                 'sha256'
         53        SEND_VAR                                                 !6
         54        INIT_FCALL                                               'base64_decode'
         55        SEND_VAR                                                 !2
         56        DO_ICALL                                         $43     
         57        SEND_VAR                                                 $43
         58        SEND_VAL                                                 <true>
         59        DO_ICALL                                         $44     
         60        SEND_VAR                                                 $44
         61        DO_ICALL                                         $45     
         62        CONCAT                                           ~46     ~42, $45
         63        ASSIGN                                                   !7, ~46
   31    64        CONCAT                                           ~48     'https%3A%2F%2F', !1
         65        CONCAT                                           ~49     ~48, '.blob.core.windows.net'
         66        ASSIGN                                                   !8, ~49
   32    67        CONCAT                                           ~51     !8, '%2F'
         68        CONCAT                                           ~52     ~51, !10
         69        CONCAT                                           ~53     ~52, '%3Frestype%3Dcontainer%26comp%3Dlist'
         70        ASSIGN                                                   !9, ~53
   35    71        NOP                                                      
         72        FAST_CONCAT                                      ~55     'x-ms-date%3A', !0
         73        INIT_ARRAY                                       ~56     ~55
   36    74        ADD_ARRAY_ELEMENT                                ~56     'x-ms-version%3A2014-02-14'
   37    75        ADD_ARRAY_ELEMENT                                ~56     'Accept%3Aapplication%2Fjson%3Bodata%3Dnometadata'
   38    76        NOP                                                      
         77        FAST_CONCAT                                      ~57     'Authorization%3A', !7
         78        ADD_ARRAY_ELEMENT                                ~56     ~57
   34    79        ASSIGN                                                   !11, ~56
   42    80        ECHO                                                     !7
         81      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.4 ms | 1400 KiB | 23 Q