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 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 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
SharedKey inorbitalstorage:j1f9lkjI44CiDvHL+XexxxeqrOvJZFK58q7Hesj18pU=
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 SharedKey inorbitalstorage:j1f9lkjI44CiDvHL+XexxxeqrOvJZFK58q7Hesj18pU=

preferences:
176 ms | 402 KiB | 291 Q