3v4l.org

run code in 300+ PHP versions simultaneously
<?php //extract data from the post extract($_POST); //set POST variables $url = 'http://domain.com/get-post.php'; $fields = array( 'lname' => urlencode($last_name), 'fname' => urlencode($first_name), 'title' => urlencode($title), 'company' => urlencode($institution), 'age' => urlencode($age), 'email' => urlencode($email), 'phone' => urlencode($phone) ); //url-ify the data for the POST foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } rtrim($fields_string, '&'); //open connection $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch,CURLOPT_URL, $url); curl_setopt($ch,CURLOPT_POST, count($fields)); curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); //execute post $result = curl_exec($ch); //close connection curl_close($ch);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 35, Position 2 = 42
Branch analysis from position: 35
2 jumps found. (Code = 78) Position 1 = 36, Position 2 = 42
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
filename:       /in/SHsZf
function name:  (null)
number of ops:  77
compiled vars:  !0 = $url, !1 = $fields, !2 = $last_name, !3 = $first_name, !4 = $title, !5 = $institution, !6 = $age, !7 = $email, !8 = $phone, !9 = $value, !10 = $key, !11 = $fields_string, !12 = $ch, !13 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'extract'
          1        FETCH_W                      global              $14     '_POST'
          2        SEND_REF                                                 $14
          3        DO_ICALL                                                 
    6     4        ASSIGN                                                   !0, 'http%3A%2F%2Fdomain.com%2Fget-post.php'
    8     5        INIT_FCALL                                               'urlencode'
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $17     
          8        INIT_ARRAY                                       ~18     $17, 'lname'
    9     9        INIT_FCALL                                               'urlencode'
         10        SEND_VAR                                                 !3
         11        DO_ICALL                                         $19     
         12        ADD_ARRAY_ELEMENT                                ~18     $19, 'fname'
   10    13        INIT_FCALL                                               'urlencode'
         14        SEND_VAR                                                 !4
         15        DO_ICALL                                         $20     
         16        ADD_ARRAY_ELEMENT                                ~18     $20, 'title'
   11    17        INIT_FCALL                                               'urlencode'
         18        SEND_VAR                                                 !5
         19        DO_ICALL                                         $21     
         20        ADD_ARRAY_ELEMENT                                ~18     $21, 'company'
   12    21        INIT_FCALL                                               'urlencode'
         22        SEND_VAR                                                 !6
         23        DO_ICALL                                         $22     
         24        ADD_ARRAY_ELEMENT                                ~18     $22, 'age'
   13    25        INIT_FCALL                                               'urlencode'
         26        SEND_VAR                                                 !7
         27        DO_ICALL                                         $23     
         28        ADD_ARRAY_ELEMENT                                ~18     $23, 'email'
   14    29        INIT_FCALL                                               'urlencode'
         30        SEND_VAR                                                 !8
         31        DO_ICALL                                         $24     
         32        ADD_ARRAY_ELEMENT                                ~18     $24, 'phone'
    7    33        ASSIGN                                                   !1, ~18
   18    34      > FE_RESET_R                                       $26     !1, ->42
         35    > > FE_FETCH_R                                       ~27     $26, !9, ->42
         36    >   ASSIGN                                                   !10, ~27
         37        CONCAT                                           ~29     !10, '%3D'
         38        CONCAT                                           ~30     ~29, !9
         39        CONCAT                                           ~31     ~30, '%26'
         40        ASSIGN_OP                                     8          !11, ~31
         41      > JMP                                                      ->35
         42    >   FE_FREE                                                  $26
   19    43        INIT_FCALL                                               'rtrim'
         44        SEND_VAR                                                 !11
         45        SEND_VAL                                                 '%26'
         46        DO_ICALL                                                 
   22    47        INIT_FCALL_BY_NAME                                       'curl_init'
         48        DO_FCALL                                      0  $34     
         49        ASSIGN                                                   !12, $34
   25    50        INIT_FCALL_BY_NAME                                       'curl_setopt'
         51        SEND_VAR_EX                                              !12
         52        FETCH_CONSTANT                                   ~36     'CURLOPT_URL'
         53        SEND_VAL_EX                                              ~36
         54        SEND_VAR_EX                                              !0
         55        DO_FCALL                                      0          
   26    56        INIT_FCALL_BY_NAME                                       'curl_setopt'
         57        SEND_VAR_EX                                              !12
         58        FETCH_CONSTANT                                   ~38     'CURLOPT_POST'
         59        SEND_VAL_EX                                              ~38
         60        COUNT                                            ~39     !1
         61        SEND_VAL_EX                                              ~39
         62        DO_FCALL                                      0          
   27    63        INIT_FCALL_BY_NAME                                       'curl_setopt'
         64        SEND_VAR_EX                                              !12
         65        FETCH_CONSTANT                                   ~41     'CURLOPT_POSTFIELDS'
         66        SEND_VAL_EX                                              ~41
         67        SEND_VAR_EX                                              !11
         68        DO_FCALL                                      0          
   30    69        INIT_FCALL_BY_NAME                                       'curl_exec'
         70        SEND_VAR_EX                                              !12
         71        DO_FCALL                                      0  $43     
         72        ASSIGN                                                   !13, $43
   33    73        INIT_FCALL_BY_NAME                                       'curl_close'
         74        SEND_VAR_EX                                              !12
         75        DO_FCALL                                      0          
         76      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.28 ms | 1400 KiB | 19 Q