3v4l.org

run code in 300+ PHP versions simultaneously
<?php $username = "robert.shaw@reddotnetwork.com"; $secretKey = sha1("LetMeIn2014"); $verb = "GET"; $body = json_encode("{\"Request\":{\"satn\":\"181101\"},\"emailAddress\":\"robert.shaw@reddotnetwork.com\"}"); $contentmd5 = base64_encode(md5($body, true)); $contentType = "application/json"; $dateNow = gmdate("c"); $authCode = base64_encode(hash_hmac("sha1", $verb . "\n" . $contentmd5 . "\n" . $contentType . "\n" . $dateNow, $secretKey)); $header = "Content-Type: application/json" . "\n" . "Content-Length: " . strlen($body) . "\n" . "Content-MD5: " . $contentmd5 . "\n" . "Date: " . $dateNow . "\n" . "Authorization: RDN " . $username . ":" . $authCode; print($header);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dDApf
function name:  (null)
number of ops:  54
compiled vars:  !0 = $username, !1 = $secretKey, !2 = $verb, !3 = $body, !4 = $contentmd5, !5 = $contentType, !6 = $dateNow, !7 = $authCode, !8 = $header
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'robert.shaw%40reddotnetwork.com'
    3     1        INIT_FCALL                                               'sha1'
          2        SEND_VAL                                                 'LetMeIn2014'
          3        DO_ICALL                                         $10     
          4        ASSIGN                                                   !1, $10
    4     5        ASSIGN                                                   !2, 'GET'
    5     6        INIT_FCALL                                               'json_encode'
          7        SEND_VAL                                                 '%7B%22Request%22%3A%7B%22satn%22%3A%22181101%22%7D%2C%22emailAddress%22%3A%22robert.shaw%40reddotnetwork.com%22%7D'
          8        DO_ICALL                                         $13     
          9        ASSIGN                                                   !3, $13
    6    10        INIT_FCALL                                               'base64_encode'
         11        INIT_FCALL                                               'md5'
         12        SEND_VAR                                                 !3
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $15     
         15        SEND_VAR                                                 $15
         16        DO_ICALL                                         $16     
         17        ASSIGN                                                   !4, $16
    7    18        ASSIGN                                                   !5, 'application%2Fjson'
    8    19        INIT_FCALL                                               'gmdate'
         20        SEND_VAL                                                 'c'
         21        DO_ICALL                                         $19     
         22        ASSIGN                                                   !6, $19
    9    23        INIT_FCALL                                               'base64_encode'
         24        INIT_FCALL                                               'hash_hmac'
         25        SEND_VAL                                                 'sha1'
         26        CONCAT                                           ~21     !2, '%0A'
         27        CONCAT                                           ~22     ~21, !4
         28        CONCAT                                           ~23     ~22, '%0A'
         29        CONCAT                                           ~24     ~23, !5
         30        CONCAT                                           ~25     ~24, '%0A'
         31        CONCAT                                           ~26     ~25, !6
         32        SEND_VAL                                                 ~26
         33        SEND_VAR                                                 !1
         34        DO_ICALL                                         $27     
         35        SEND_VAR                                                 $27
         36        DO_ICALL                                         $28     
         37        ASSIGN                                                   !7, $28
   10    38        STRLEN                                           ~30     !3
         39        CONCAT                                           ~31     'Content-Type%3A+application%2Fjson%0AContent-Length%3A+', ~30
         40        CONCAT                                           ~32     ~31, '%0A'
         41        CONCAT                                           ~33     ~32, 'Content-MD5%3A+'
         42        CONCAT                                           ~34     ~33, !4
         43        CONCAT                                           ~35     ~34, '%0A'
         44        CONCAT                                           ~36     ~35, 'Date%3A+'
         45        CONCAT                                           ~37     ~36, !6
         46        CONCAT                                           ~38     ~37, '%0A'
         47        CONCAT                                           ~39     ~38, 'Authorization%3A+RDN+'
         48        CONCAT                                           ~40     ~39, !0
         49        CONCAT                                           ~41     ~40, '%3A'
         50        CONCAT                                           ~42     ~41, !7
         51        ASSIGN                                                   !8, ~42
   11    52        ECHO                                                     !8
         53      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.6 ms | 1400 KiB | 25 Q