3v4l.org

run code in 300+ PHP versions simultaneously
<?php $get_string = "TOKEN=EC%2d09F245458F168291J&TIMESTAMP=2015%2d08%2d29T08%3a22%3a55Z&CORRELATIONID=bf30a7057eaa1&ACK=Success&VERSION=78&BUILD=000000"; parse_str($get_string, $get_array); //print_r($get_array); // echo $get_array['ACK']; $post_data=['name'=>'John', 'surname'=>'Doe', 'age'=>36]; $url = "http://myremoteservice/"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); $output = curl_exec($ch); curl_close($ch); echo $output;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HCW6p
function name:  (null)
number of ops:  43
compiled vars:  !0 = $get_string, !1 = $get_array, !2 = $post_data, !3 = $url, !4 = $ch, !5 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'TOKEN%3DEC%252d09F245458F168291J%26TIMESTAMP%3D2015%252d08%252d29T08%253a22%253a55Z%26CORRELATIONID%3Dbf30a7057eaa1%26ACK%3DSuccess%26VERSION%3D78%26BUILD%3D000000'
    5     1        INIT_FCALL                                               'parse_str'
          2        SEND_VAR                                                 !0
          3        SEND_REF                                                 !1
          4        DO_ICALL                                                 
   20     5        ASSIGN                                                   !2, <array>
   23     6        ASSIGN                                                   !3, 'http%3A%2F%2Fmyremoteservice%2F'
   25     7        INIT_FCALL_BY_NAME                                       'curl_init'
          8        DO_FCALL                                      0  $10     
          9        ASSIGN                                                   !4, $10
   27    10        INIT_FCALL_BY_NAME                                       'curl_setopt'
         11        SEND_VAR_EX                                              !4
         12        FETCH_CONSTANT                                   ~12     'CURLOPT_URL'
         13        SEND_VAL_EX                                              ~12
         14        SEND_VAR_EX                                              !3
         15        DO_FCALL                                      0          
   29    16        INIT_FCALL_BY_NAME                                       'curl_setopt'
         17        SEND_VAR_EX                                              !4
         18        FETCH_CONSTANT                                   ~14     'CURLOPT_RETURNTRANSFER'
         19        SEND_VAL_EX                                              ~14
         20        SEND_VAL_EX                                              1
         21        DO_FCALL                                      0          
   31    22        INIT_FCALL_BY_NAME                                       'curl_setopt'
         23        SEND_VAR_EX                                              !4
         24        FETCH_CONSTANT                                   ~16     'CURLOPT_POST'
         25        SEND_VAL_EX                                              ~16
         26        SEND_VAL_EX                                              1
         27        DO_FCALL                                      0          
   33    28        INIT_FCALL_BY_NAME                                       'curl_setopt'
         29        SEND_VAR_EX                                              !4
         30        FETCH_CONSTANT                                   ~18     'CURLOPT_POSTFIELDS'
         31        SEND_VAL_EX                                              ~18
         32        SEND_VAR_EX                                              !2
         33        DO_FCALL                                      0          
   35    34        INIT_FCALL_BY_NAME                                       'curl_exec'
         35        SEND_VAR_EX                                              !4
         36        DO_FCALL                                      0  $20     
         37        ASSIGN                                                   !5, $20
   37    38        INIT_FCALL_BY_NAME                                       'curl_close'
         39        SEND_VAR_EX                                              !4
         40        DO_FCALL                                      0          
   39    41        ECHO                                                     !5
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.19 ms | 1400 KiB | 15 Q