3v4l.org

run code in 300+ PHP versions simultaneously
<?php //set POST variables $url = 'http://sp2.looki.co.uk/index.php'; $fields = array( 'login'=>urlencode("jamesfleming91@gmail.com"), 'passwd'=>urlencode("password") ); //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 = 11, Position 2 = 18
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 18
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/lee7t
function name:  (null)
number of ops:  53
compiled vars:  !0 = $url, !1 = $fields, !2 = $value, !3 = $key, !4 = $fields_string, !5 = $ch, !6 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fsp2.looki.co.uk%2Findex.php'
    6     1        INIT_FCALL                                               'urlencode'
          2        SEND_VAL                                                 'jamesfleming91%40gmail.com'
          3        DO_ICALL                                         $8      
          4        INIT_ARRAY                                       ~9      $8, 'login'
    7     5        INIT_FCALL                                               'urlencode'
          6        SEND_VAL                                                 'password'
          7        DO_ICALL                                         $10     
          8        ADD_ARRAY_ELEMENT                                ~9      $10, 'passwd'
    5     9        ASSIGN                                                   !1, ~9
   11    10      > FE_RESET_R                                       $12     !1, ->18
         11    > > FE_FETCH_R                                       ~13     $12, !2, ->18
         12    >   ASSIGN                                                   !3, ~13
   13    13        CONCAT                                           ~15     !3, '%3D'
         14        CONCAT                                           ~16     ~15, !2
         15        CONCAT                                           ~17     ~16, '%26'
         16        ASSIGN_OP                                     8          !4, ~17
   11    17      > JMP                                                      ->11
         18    >   FE_FREE                                                  $12
   15    19        INIT_FCALL                                               'rtrim'
         20        SEND_VAR                                                 !4
         21        SEND_VAL                                                 '%26'
         22        DO_ICALL                                                 
   18    23        INIT_FCALL_BY_NAME                                       'curl_init'
         24        DO_FCALL                                      0  $20     
         25        ASSIGN                                                   !5, $20
   21    26        INIT_FCALL_BY_NAME                                       'curl_setopt'
         27        SEND_VAR_EX                                              !5
         28        FETCH_CONSTANT                                   ~22     'CURLOPT_URL'
         29        SEND_VAL_EX                                              ~22
         30        SEND_VAR_EX                                              !0
         31        DO_FCALL                                      0          
   22    32        INIT_FCALL_BY_NAME                                       'curl_setopt'
         33        SEND_VAR_EX                                              !5
         34        FETCH_CONSTANT                                   ~24     'CURLOPT_POST'
         35        SEND_VAL_EX                                              ~24
         36        COUNT                                            ~25     !1
         37        SEND_VAL_EX                                              ~25
         38        DO_FCALL                                      0          
   23    39        INIT_FCALL_BY_NAME                                       'curl_setopt'
         40        SEND_VAR_EX                                              !5
         41        FETCH_CONSTANT                                   ~27     'CURLOPT_POSTFIELDS'
         42        SEND_VAL_EX                                              ~27
         43        SEND_VAR_EX                                              !4
         44        DO_FCALL                                      0          
   26    45        INIT_FCALL_BY_NAME                                       'curl_exec'
         46        SEND_VAR_EX                                              !5
         47        DO_FCALL                                      0  $29     
         48        ASSIGN                                                   !6, $29
   29    49        INIT_FCALL_BY_NAME                                       'curl_close'
         50        SEND_VAR_EX                                              !5
         51        DO_FCALL                                      0          
         52      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.76 ms | 1400 KiB | 17 Q