3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime(); $url = "https://api.uds.app/partner/v2/settings"; $uuid_v4 = 'UUID'; //generate universally unique identifier version 4 (RFC 4122) $companyId = 123; //set ID of your company $apiKey = 'ZDk1MmE5NzMtODcxNi00YzIwLTllZDMtN2ZjM2NjOGI2YTMz'; //set company apikey // Create a stream $opts = array( 'http' => array( 'method' => 'GET', 'header' => "Accept: application/json\r\n" . "Accept-Charset: utf-8\r\n" . "Authorization: Basic ". base64_encode("$companyId:$apiKey")."\r\n" . "X-Origin-Request-Id: ".$uuid_v4."\r\n" . "X-Timestamp: ".$date->format(DateTime::ATOM) ) ); $context = stream_context_create($opts); $result = file_get_contents($url, false, $context); echo $result;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pjpKQ
function name:  (null)
number of ops:  39
compiled vars:  !0 = $date, !1 = $url, !2 = $uuid_v4, !3 = $companyId, !4 = $apiKey, !5 = $opts, !6 = $context, !7 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $8      'DateTime'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $8
    4     3        ASSIGN                                                   !1, 'https%3A%2F%2Fapi.uds.app%2Fpartner%2Fv2%2Fsettings'
    5     4        ASSIGN                                                   !2, 'UUID'
    6     5        ASSIGN                                                   !3, 123
    7     6        ASSIGN                                                   !4, 'ZDk1MmE5NzMtODcxNi00YzIwLTllZDMtN2ZjM2NjOGI2YTMz'
   13     7        INIT_ARRAY                                       ~15     'GET', 'method'
   16     8        INIT_FCALL                                               'base64_encode'
          9        ROPE_INIT                                     3  ~17     !3
         10        ROPE_ADD                                      1  ~17     ~17, '%3A'
         11        ROPE_END                                      2  ~16     ~17, !4
         12        SEND_VAL                                                 ~16
         13        DO_ICALL                                         $19     
         14        CONCAT                                           ~20     'Accept%3A+application%2Fjson%0D%0AAccept-Charset%3A+utf-8%0D%0AAuthorization%3A+Basic+', $19
         15        CONCAT                                           ~21     ~20, '%0D%0A'
   17    16        CONCAT                                           ~22     ~21, 'X-Origin-Request-Id%3A+'
         17        CONCAT                                           ~23     ~22, !2
         18        CONCAT                                           ~24     ~23, '%0D%0A'
   18    19        CONCAT                                           ~25     ~24, 'X-Timestamp%3A+'
         20        INIT_METHOD_CALL                                         !0, 'format'
         21        SEND_VAL_EX                                              'Y-m-d%5CTH%3Ai%3AsP'
         22        DO_FCALL                                      0  $26     
         23        CONCAT                                           ~27     ~25, $26
         24        ADD_ARRAY_ELEMENT                                ~15     ~27, 'header'
         25        INIT_ARRAY                                       ~28     ~15, 'http'
   11    26        ASSIGN                                                   !5, ~28
   22    27        INIT_FCALL                                               'stream_context_create'
         28        SEND_VAR                                                 !5
         29        DO_ICALL                                         $30     
         30        ASSIGN                                                   !6, $30
   23    31        INIT_FCALL                                               'file_get_contents'
         32        SEND_VAR                                                 !1
         33        SEND_VAL                                                 <false>
         34        SEND_VAR                                                 !6
         35        DO_ICALL                                         $32     
         36        ASSIGN                                                   !7, $32
   25    37        ECHO                                                     !7
   26    38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.02 ms | 1013 KiB | 16 Q