3v4l.org

run code in 300+ PHP versions simultaneously
<?php // jSON Request URL $json_url = 'https://creativecommons.tankerkoenig.de/json/detail.php?callback=jQuery21109931204902741544_1440230150966&id=fb79c457-543a-4ff6-ba70-cd270ac2110a&apikey=00000000-0000-0000-0000-000000000001&_=1440230150968'; $username = ‘your_username’; // authentication $password = ‘your_password’; // authentication // jSON String for request $json_string = 'station->e5'; // Initializing curl $ch = curl_init( $json_url ); // Configuring curl options $options = array( CURLOPT_RETURNTRANSFER => true, CURLOPT_USERPWD => $username . ":" . $password, // authentication CURLOPT_HTTPHEADER => array('Content-type: application/json') , CURLOPT_POSTFIELDS => $json_string ); // Setting curl options curl_setopt_array( $ch, $options ); // Getting results $result = curl_exec($ch); // Getting jSON result string ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DsI5S
function name:  (null)
number of ops:  30
compiled vars:  !0 = $json_url, !1 = $username, !2 = $password, !3 = $json_string, !4 = $ch, !5 = $options, !6 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'https%3A%2F%2Fcreativecommons.tankerkoenig.de%2Fjson%2Fdetail.php%3Fcallback%3DjQuery21109931204902741544_1440230150966%26id%3Dfb79c457-543a-4ff6-ba70-cd270ac2110a%26apikey%3D00000000-0000-0000-0000-000000000001%26_%3D1440230150968'
    6     1        FETCH_CONSTANT                                   ~8      '%E2%80%98your_username%E2%80%99'
          2        ASSIGN                                                   !1, ~8
    7     3        FETCH_CONSTANT                                   ~10     '%E2%80%98your_password%E2%80%99'
          4        ASSIGN                                                   !2, ~10
   10     5        ASSIGN                                                   !3, 'station-%3Ee5'
   13     6        INIT_FCALL_BY_NAME                                       'curl_init'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0  $13     
          9        ASSIGN                                                   !4, $13
   17    10        FETCH_CONSTANT                                   ~15     'CURLOPT_RETURNTRANSFER'
         11        INIT_ARRAY                                       ~16     <true>, ~15
   18    12        FETCH_CONSTANT                                   ~17     'CURLOPT_USERPWD'
         13        CONCAT                                           ~18     !1, '%3A'
         14        CONCAT                                           ~19     ~18, !2
         15        ADD_ARRAY_ELEMENT                                ~16     ~19, ~17
   19    16        FETCH_CONSTANT                                   ~20     'CURLOPT_HTTPHEADER'
   17    17        ADD_ARRAY_ELEMENT                                ~16     <array>, ~20
   20    18        FETCH_CONSTANT                                   ~21     'CURLOPT_POSTFIELDS'
         19        ADD_ARRAY_ELEMENT                                ~16     !3, ~21
   16    20        ASSIGN                                                   !5, ~16
   24    21        INIT_FCALL_BY_NAME                                       'curl_setopt_array'
         22        SEND_VAR_EX                                              !4
         23        SEND_VAR_EX                                              !5
         24        DO_FCALL                                      0          
   27    25        INIT_FCALL_BY_NAME                                       'curl_exec'
         26        SEND_VAR_EX                                              !4
         27        DO_FCALL                                      0  $24     
         28        ASSIGN                                                   !6, $24
   29    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.94 ms | 1395 KiB | 13 Q