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;
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Warning: Undefined variable $containername in /in/blL4I on line 32 SharedKey inorbitalstorage:6+2TSLHnO/pUv7wnCJVw2Ojec4xTwpkdXwjc4R5nzfs=
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Warning: Undefined variable $containername in /in/blL4I on line 32 SharedKey inorbitalstorage:6+2TSLHnO/pUv7wnCJVw2Ojec4xTwpkdXwjc4R5nzfs=
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.33
Notice: Undefined variable: containername in /in/blL4I on line 32 SharedKey inorbitalstorage:6+2TSLHnO/pUv7wnCJVw2Ojec4xTwpkdXwjc4R5nzfs=
Output for 7.3.32 - 7.3.33
SharedKey inorbitalstorage:6+2TSLHnO/pUv7wnCJVw2Ojec4xTwpkdXwjc4R5nzfs=

preferences:
134.63 ms | 401 KiB | 174 Q