3v4l.org

run code in 300+ PHP versions simultaneously
<?php print "Hi"; $ch = curl_init("http://www.google.com/"); var_dump($ch); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "postvar1=value1&postvar2=value2&postvar3=value3"); // in real life you should use something like: // curl_setopt($ch, CURLOPT_POSTFIELDS, // http_build_query(array('postvar1' => 'value1'))); // receive server response ... curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $server_output = curl_exec ($ch); curl_close ($ch); // further processing .... if ($server_output == "OK") { print "OK"; } else { print "FAIL"; } var_dump($server_output); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 37
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OWcQq
function name:  (null)
number of ops:  42
compiled vars:  !0 = $ch, !1 = $server_output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     'Hi'
    3     1        INIT_FCALL_BY_NAME                                       'curl_init'
          2        SEND_VAL_EX                                              'http%3A%2F%2Fwww.google.com%2F'
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !0, $2
    5     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    7     8        INIT_FCALL_BY_NAME                                       'curl_setopt'
          9        SEND_VAR_EX                                              !0
         10        FETCH_CONSTANT                                   ~5      'CURLOPT_POST'
         11        SEND_VAL_EX                                              ~5
         12        SEND_VAL_EX                                              1
         13        DO_FCALL                                      0          
    8    14        INIT_FCALL_BY_NAME                                       'curl_setopt'
         15        SEND_VAR_EX                                              !0
         16        FETCH_CONSTANT                                   ~7      'CURLOPT_POSTFIELDS'
         17        SEND_VAL_EX                                              ~7
    9    18        SEND_VAL_EX                                              'postvar1%3Dvalue1%26postvar2%3Dvalue2%26postvar3%3Dvalue3'
         19        DO_FCALL                                      0          
   15    20        INIT_FCALL_BY_NAME                                       'curl_setopt'
         21        SEND_VAR_EX                                              !0
         22        FETCH_CONSTANT                                   ~9      'CURLOPT_RETURNTRANSFER'
         23        SEND_VAL_EX                                              ~9
         24        SEND_VAL_EX                                              <true>
         25        DO_FCALL                                      0          
   17    26        INIT_FCALL_BY_NAME                                       'curl_exec'
         27        SEND_VAR_EX                                              !0
         28        DO_FCALL                                      0  $11     
         29        ASSIGN                                                   !1, $11
   19    30        INIT_FCALL_BY_NAME                                       'curl_close'
         31        SEND_VAR_EX                                              !0
         32        DO_FCALL                                      0          
   22    33        IS_EQUAL                                                 !1, 'OK'
         34      > JMPZ                                                     ~14, ->37
         35    >   ECHO                                                     'OK'
         36      > JMP                                                      ->38
         37    >   ECHO                                                     'FAIL'
   23    38    >   INIT_FCALL                                               'var_dump'
         39        SEND_VAR                                                 !1
         40        DO_ICALL                                                 
   25    41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.5 ms | 1400 KiB | 15 Q