3v4l.org

run code in 300+ PHP versions simultaneously
<?php function BitBay_Trading_Api($method, $params = array()) { $key = "123"; $secret = "321"; $params["method"] = "info"; $params["moment"] = time(); $post = http_build_query($params, "", "&"); $sign = hash_hmac("sha512", $post, $secret); $headers = array( "API-Key: " . $key, "API-Hash: " . $sign, ); $curl = curl_init(); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_URL, "https://bitbay.net/API/Trading/tradingApi.php"); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $post); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); //$ret = curl_exec($curl); // return $ret; return $params["method"]; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0akmp
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E > > RETURN                                                   1

Function bitbay_trading_api:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0akmp
function name:  BitBay_Trading_Api
number of ops:  63
compiled vars:  !0 = $method, !1 = $params, !2 = $key, !3 = $secret, !4 = $post, !5 = $sign, !6 = $headers, !7 = $curl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <array>
    4     2        ASSIGN                                                   !2, '123'
    5     3        ASSIGN                                                   !3, '321'
    7     4        ASSIGN_DIM                                               !1, 'method'
          5        OP_DATA                                                  'info'
    8     6        INIT_FCALL                                               'time'
          7        DO_ICALL                                         $12     
          8        ASSIGN_DIM                                               !1, 'moment'
          9        OP_DATA                                                  $12
   10    10        INIT_FCALL                                               'http_build_query'
         11        SEND_VAR                                                 !1
         12        SEND_VAL                                                 ''
         13        SEND_VAL                                                 '%26'
         14        DO_ICALL                                         $13     
         15        ASSIGN                                                   !4, $13
   11    16        INIT_FCALL                                               'hash_hmac'
         17        SEND_VAL                                                 'sha512'
         18        SEND_VAR                                                 !4
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                         $15     
         21        ASSIGN                                                   !5, $15
   13    22        CONCAT                                           ~17     'API-Key%3A+', !2
         23        INIT_ARRAY                                       ~18     ~17
   14    24        CONCAT                                           ~19     'API-Hash%3A+', !5
         25        ADD_ARRAY_ELEMENT                                ~18     ~19
   12    26        ASSIGN                                                   !6, ~18
   16    27        INIT_FCALL_BY_NAME                                       'curl_init'
         28        DO_FCALL                                      0  $21     
         29        ASSIGN                                                   !7, $21
   17    30        INIT_FCALL_BY_NAME                                       'curl_setopt'
         31        SEND_VAR_EX                                              !7
         32        FETCH_CONSTANT                                   ~23     'CURLOPT_RETURNTRANSFER'
         33        SEND_VAL_EX                                              ~23
         34        SEND_VAL_EX                                              <true>
         35        DO_FCALL                                      0          
   18    36        INIT_FCALL_BY_NAME                                       'curl_setopt'
         37        SEND_VAR_EX                                              !7
         38        FETCH_CONSTANT                                   ~25     'CURLOPT_URL'
         39        SEND_VAL_EX                                              ~25
         40        SEND_VAL_EX                                              'https%3A%2F%2Fbitbay.net%2FAPI%2FTrading%2FtradingApi.php'
         41        DO_FCALL                                      0          
   19    42        INIT_FCALL_BY_NAME                                       'curl_setopt'
         43        SEND_VAR_EX                                              !7
         44        FETCH_CONSTANT                                   ~27     'CURLOPT_POST'
         45        SEND_VAL_EX                                              ~27
         46        SEND_VAL_EX                                              <true>
         47        DO_FCALL                                      0          
   20    48        INIT_FCALL_BY_NAME                                       'curl_setopt'
         49        SEND_VAR_EX                                              !7
         50        FETCH_CONSTANT                                   ~29     'CURLOPT_POSTFIELDS'
         51        SEND_VAL_EX                                              ~29
         52        SEND_VAR_EX                                              !4
         53        DO_FCALL                                      0          
   21    54        INIT_FCALL_BY_NAME                                       'curl_setopt'
         55        SEND_VAR_EX                                              !7
         56        FETCH_CONSTANT                                   ~31     'CURLOPT_HTTPHEADER'
         57        SEND_VAL_EX                                              ~31
         58        SEND_VAR_EX                                              !6
         59        DO_FCALL                                      0          
   26    60        FETCH_DIM_R                                      ~33     !1, 'method'
         61      > RETURN                                                   ~33
   27    62*     > RETURN                                                   null

End of function bitbay_trading_api

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.4 ms | 945 KiB | 20 Q