3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.77 ms | 1405 KiB | 25 Q