3v4l.org

run code in 300+ PHP versions simultaneously
<? $c = curl_init('https://apple.com'); curl_setopt($c, CURLOPT_RETURNTRANSFER, true); //curl_setopt(... other options you want...) $html = curl_exec($c); if (curl_error($c)) die(curl_error($c)); // Get the status code $status = curl_getinfo($c, CURLINFO_HTTP_CODE); curl_close($c);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 22
Branch analysis from position: 18
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cAigR
function name:  (null)
number of ops:  32
compiled vars:  !0 = $c, !1 = $html, !2 = $status
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'curl_init'
          1        SEND_VAL_EX                                              'https%3A%2F%2Fapple.com'
          2        DO_FCALL                                      0  $3      
          3        ASSIGN                                                   !0, $3
    3     4        INIT_FCALL_BY_NAME                                       'curl_setopt'
          5        SEND_VAR_EX                                              !0
          6        FETCH_CONSTANT                                   ~5      'CURLOPT_RETURNTRANSFER'
          7        SEND_VAL_EX                                              ~5
          8        SEND_VAL_EX                                              <true>
          9        DO_FCALL                                      0          
    6    10        INIT_FCALL_BY_NAME                                       'curl_exec'
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0  $7      
         13        ASSIGN                                                   !1, $7
    8    14        INIT_FCALL_BY_NAME                                       'curl_error'
         15        SEND_VAR_EX                                              !0
         16        DO_FCALL                                      0  $9      
         17      > JMPZ                                                     $9, ->22
    9    18    >   INIT_FCALL_BY_NAME                                       'curl_error'
         19        SEND_VAR_EX                                              !0
         20        DO_FCALL                                      0  $10     
         21      > EXIT                                                     $10
   12    22    >   INIT_FCALL_BY_NAME                                       'curl_getinfo'
         23        SEND_VAR_EX                                              !0
         24        FETCH_CONSTANT                                   ~11     'CURLINFO_HTTP_CODE'
         25        SEND_VAL_EX                                              ~11
         26        DO_FCALL                                      0  $12     
         27        ASSIGN                                                   !2, $12
   14    28        INIT_FCALL_BY_NAME                                       'curl_close'
         29        SEND_VAR_EX                                              !0
         30        DO_FCALL                                      0          
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.19 ms | 1395 KiB | 13 Q