3v4l.org

run code in 300+ PHP versions simultaneously
<?php function httpPost($url,$params){ $postData = ''; //create name value pairs seperated by & foreach($params as $k => $v) { $postData .= $k . '='.$v.'&'; } rtrim($postData, '&'); $ch = curl_init($url); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); curl_setopt($ch,CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_POST, count($postData)); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); $output=curl_exec($ch); curl_close($ch); return $output; } $params = array("mail" => "heyyou@netc.fr"); httpPost("http://hacking.newbiecontest.org:10080/randy/index.php?page=passperdu",$params); $params = array("mail" => "g0d@dtc.com"); httpPost("http://hacking.newbiecontest.org:10080/randy/index.php?page=passperdu",$params); $params = array("mail" => "heyyou@netc.fr"); httpPost("http://hacking.newbiecontest.org:10080/randy/index.php?page=passperdu",$params); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uo3r4
function name:  (null)
number of ops:  16
compiled vars:  !0 = $params
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ASSIGN                                                   !0, <array>
   22     1        INIT_FCALL                                               'httppost'
          2        SEND_VAL                                                 'http%3A%2F%2Fhacking.newbiecontest.org%3A10080%2Frandy%2Findex.php%3Fpage%3Dpassperdu'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0          
   24     5        ASSIGN                                                   !0, <array>
   25     6        INIT_FCALL                                               'httppost'
          7        SEND_VAL                                                 'http%3A%2F%2Fhacking.newbiecontest.org%3A10080%2Frandy%2Findex.php%3Fpage%3Dpassperdu'
          8        SEND_VAR                                                 !0
          9        DO_FCALL                                      0          
   27    10        ASSIGN                                                   !0, <array>
   28    11        INIT_FCALL                                               'httppost'
         12        SEND_VAL                                                 'http%3A%2F%2Fhacking.newbiecontest.org%3A10080%2Frandy%2Findex.php%3Fpage%3Dpassperdu'
         13        SEND_VAR                                                 !0
         14        DO_FCALL                                      0          
   30    15      > RETURN                                                   1

Function httppost:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/uo3r4
function name:  httpPost
number of ops:  60
compiled vars:  !0 = $url, !1 = $params, !2 = $postData, !3 = $v, !4 = $k, !5 = $ch, !6 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ASSIGN                                                   !2, ''
    6     3      > FE_RESET_R                                       $8      !1, ->11
          4    > > FE_FETCH_R                                       ~9      $8, !3, ->11
          5    >   ASSIGN                                                   !4, ~9
    7     6        CONCAT                                           ~11     !4, '%3D'
          7        CONCAT                                           ~12     ~11, !3
          8        CONCAT                                           ~13     ~12, '%26'
          9        ASSIGN_OP                                     8          !2, ~13
    6    10      > JMP                                                      ->4
         11    >   FE_FREE                                                  $8
    9    12        INIT_FCALL                                               'rtrim'
         13        SEND_VAR                                                 !2
         14        SEND_VAL                                                 '%26'
         15        DO_ICALL                                                 
   10    16        INIT_FCALL_BY_NAME                                       'curl_init'
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0  $16     
         19        ASSIGN                                                   !5, $16
   11    20        INIT_FCALL_BY_NAME                                       'curl_setopt'
         21        SEND_VAR_EX                                              !5
         22        FETCH_CONSTANT                                   ~18     'CURLOPT_URL'
         23        SEND_VAL_EX                                              ~18
         24        SEND_VAR_EX                                              !0
         25        DO_FCALL                                      0          
   12    26        INIT_FCALL_BY_NAME                                       'curl_setopt'
         27        SEND_VAR_EX                                              !5
         28        FETCH_CONSTANT                                   ~20     'CURLOPT_RETURNTRANSFER'
         29        SEND_VAL_EX                                              ~20
         30        SEND_VAL_EX                                              <true>
         31        DO_FCALL                                      0          
   13    32        INIT_FCALL_BY_NAME                                       'curl_setopt'
         33        SEND_VAR_EX                                              !5
         34        FETCH_CONSTANT                                   ~22     'CURLOPT_HEADER'
         35        SEND_VAL_EX                                              ~22
         36        SEND_VAL_EX                                              <true>
         37        DO_FCALL                                      0          
   14    38        INIT_FCALL_BY_NAME                                       'curl_setopt'
         39        SEND_VAR_EX                                              !5
         40        FETCH_CONSTANT                                   ~24     'CURLOPT_POST'
         41        SEND_VAL_EX                                              ~24
         42        COUNT                                            ~25     !2
         43        SEND_VAL_EX                                              ~25
         44        DO_FCALL                                      0          
   15    45        INIT_FCALL_BY_NAME                                       'curl_setopt'
         46        SEND_VAR_EX                                              !5
         47        FETCH_CONSTANT                                   ~27     'CURLOPT_POSTFIELDS'
         48        SEND_VAL_EX                                              ~27
         49        SEND_VAR_EX                                              !2
         50        DO_FCALL                                      0          
   16    51        INIT_FCALL_BY_NAME                                       'curl_exec'
         52        SEND_VAR_EX                                              !5
         53        DO_FCALL                                      0  $29     
         54        ASSIGN                                                   !6, $29
   17    55        INIT_FCALL_BY_NAME                                       'curl_close'
         56        SEND_VAR_EX                                              !5
         57        DO_FCALL                                      0          
   18    58      > RETURN                                                   !6
   19    59*     > RETURN                                                   null

End of function httppost

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.81 ms | 1403 KiB | 18 Q