3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.56 ms | 1400 KiB | 27 Q