3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ch = curl_init(); $fields = array( 'format'=>'json', 'api_key'=>'113dd81fd2114fe8b9bfd0df5ed1c7e7', 'api_secret'=>'d114f87b30cf4a528fbdb6c4e88356ca5ffe3b38da57498d886739db04103a4e' ); $postvars = ''; foreach($fields as $key=>$value) { $postvars .= $key . "=" . $value . "&"; } $url = "https://castlesports.revelup.com/inventoryx/api/inventory/Product/"; curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_POST, 1); //0 for a get request curl_setopt($ch,CURLOPT_POSTFIELDS,$postvars); curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT ,3); curl_setopt($ch,CURLOPT_TIMEOUT, 20); $response = curl_exec($ch); print "curl response is:" . $response; curl_close ($ch); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/QVkMr
function name:  (null)
number of ops:  61
compiled vars:  !0 = $ch, !1 = $fields, !2 = $postvars, !3 = $value, !4 = $key, !5 = $url, !6 = $response
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'curl_init'
          1        DO_FCALL                                      0  $7      
          2        ASSIGN                                                   !0, $7
    3     3        ASSIGN                                                   !1, <array>
    9     4        ASSIGN                                                   !2, ''
   10     5      > FE_RESET_R                                       $11     !1, ->13
          6    > > FE_FETCH_R                                       ~12     $11, !3, ->13
          7    >   ASSIGN                                                   !4, ~12
   11     8        CONCAT                                           ~14     !4, '%3D'
          9        CONCAT                                           ~15     ~14, !3
         10        CONCAT                                           ~16     ~15, '%26'
         11        ASSIGN_OP                                     8          !2, ~16
   10    12      > JMP                                                      ->6
         13    >   FE_FREE                                                  $11
   13    14        ASSIGN                                                   !5, 'https%3A%2F%2Fcastlesports.revelup.com%2Finventoryx%2Fapi%2Finventory%2FProduct%2F'
   14    15        INIT_FCALL_BY_NAME                                       'curl_setopt'
         16        SEND_VAR_EX                                              !0
         17        FETCH_CONSTANT                                   ~19     'CURLOPT_URL'
         18        SEND_VAL_EX                                              ~19
         19        SEND_VAR_EX                                              !5
         20        DO_FCALL                                      0          
   15    21        INIT_FCALL_BY_NAME                                       'curl_setopt'
         22        SEND_VAR_EX                                              !0
         23        FETCH_CONSTANT                                   ~21     'CURLOPT_POST'
         24        SEND_VAL_EX                                              ~21
         25        SEND_VAL_EX                                              1
         26        DO_FCALL                                      0          
   16    27        INIT_FCALL_BY_NAME                                       'curl_setopt'
         28        SEND_VAR_EX                                              !0
         29        FETCH_CONSTANT                                   ~23     'CURLOPT_POSTFIELDS'
         30        SEND_VAL_EX                                              ~23
         31        SEND_VAR_EX                                              !2
         32        DO_FCALL                                      0          
   17    33        INIT_FCALL_BY_NAME                                       'curl_setopt'
         34        SEND_VAR_EX                                              !0
         35        FETCH_CONSTANT                                   ~25     'CURLOPT_RETURNTRANSFER'
         36        SEND_VAL_EX                                              ~25
         37        SEND_VAL_EX                                              <true>
         38        DO_FCALL                                      0          
   18    39        INIT_FCALL_BY_NAME                                       'curl_setopt'
         40        SEND_VAR_EX                                              !0
         41        FETCH_CONSTANT                                   ~27     'CURLOPT_CONNECTTIMEOUT'
         42        SEND_VAL_EX                                              ~27
         43        SEND_VAL_EX                                              3
         44        DO_FCALL                                      0          
   19    45        INIT_FCALL_BY_NAME                                       'curl_setopt'
         46        SEND_VAR_EX                                              !0
         47        FETCH_CONSTANT                                   ~29     'CURLOPT_TIMEOUT'
         48        SEND_VAL_EX                                              ~29
         49        SEND_VAL_EX                                              20
         50        DO_FCALL                                      0          
   20    51        INIT_FCALL_BY_NAME                                       'curl_exec'
         52        SEND_VAR_EX                                              !0
         53        DO_FCALL                                      0  $31     
         54        ASSIGN                                                   !6, $31
   21    55        CONCAT                                           ~33     'curl+response+is%3A', !6
         56        ECHO                                                     ~33
   22    57        INIT_FCALL_BY_NAME                                       'curl_close'
         58        SEND_VAR_EX                                              !0
         59        DO_FCALL                                      0          
   24    60      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.62 ms | 1403 KiB | 13 Q