3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ch = curl_init("http://www.google.com/"); print $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 = 32, Position 2 = 34
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/inl9V
function name:  (null)
number of ops:  39
compiled vars:  !0 = $ch, !1 = $server_output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'curl_init'
          1        SEND_VAL_EX                                              'http%3A%2F%2Fwww.google.com%2F'
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !0, $2
    4     4        ECHO                                                     !0
    6     5        INIT_FCALL_BY_NAME                                       'curl_setopt'
          6        SEND_VAR_EX                                              !0
          7        FETCH_CONSTANT                                   ~4      'CURLOPT_POST'
          8        SEND_VAL_EX                                              ~4
          9        SEND_VAL_EX                                              1
         10        DO_FCALL                                      0          
    7    11        INIT_FCALL_BY_NAME                                       'curl_setopt'
         12        SEND_VAR_EX                                              !0
         13        FETCH_CONSTANT                                   ~6      'CURLOPT_POSTFIELDS'
         14        SEND_VAL_EX                                              ~6
    8    15        SEND_VAL_EX                                              'postvar1%3Dvalue1%26postvar2%3Dvalue2%26postvar3%3Dvalue3'
         16        DO_FCALL                                      0          
   14    17        INIT_FCALL_BY_NAME                                       'curl_setopt'
         18        SEND_VAR_EX                                              !0
         19        FETCH_CONSTANT                                   ~8      'CURLOPT_RETURNTRANSFER'
         20        SEND_VAL_EX                                              ~8
         21        SEND_VAL_EX                                              <true>
         22        DO_FCALL                                      0          
   16    23        INIT_FCALL_BY_NAME                                       'curl_exec'
         24        SEND_VAR_EX                                              !0
         25        DO_FCALL                                      0  $10     
         26        ASSIGN                                                   !1, $10
   18    27        INIT_FCALL_BY_NAME                                       'curl_close'
         28        SEND_VAR_EX                                              !0
         29        DO_FCALL                                      0          
   21    30        IS_EQUAL                                                 !1, 'OK'
         31      > JMPZ                                                     ~13, ->34
         32    >   ECHO                                                     'OK'
         33      > JMP                                                      ->35
         34    >   ECHO                                                     'FAIL'
   22    35    >   INIT_FCALL                                               'var_dump'
         36        SEND_VAR                                                 !1
         37        DO_ICALL                                                 
   24    38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.82 ms | 1396 KiB | 15 Q