3v4l.org

run code in 300+ PHP versions simultaneously
<?php $curl = curl_init(); // Set some options - we are passing in a useragent too here curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => 'http://testcURL.com/?item1=value&item2=value2', CURLOPT_USERAGENT => 'Codular Sample cURL Request' )); // Send the request & save response to $resp $resp = curl_exec($curl); // Close request to clear up some resources curl_close($curl);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GatMv
function name:  (null)
number of ops:  21
compiled vars:  !0 = $curl, !1 = $resp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'curl_init'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN                                                   !0, $2
    4     3        INIT_FCALL_BY_NAME                                       'curl_setopt_array'
          4        SEND_VAR_EX                                              !0
    5     5        FETCH_CONSTANT                                   ~4      'CURLOPT_RETURNTRANSFER'
          6        INIT_ARRAY                                       ~5      1, ~4
    6     7        FETCH_CONSTANT                                   ~6      'CURLOPT_URL'
          8        ADD_ARRAY_ELEMENT                                ~5      'http%3A%2F%2FtestcURL.com%2F%3Fitem1%3Dvalue%26item2%3Dvalue2', ~6
    7     9        FETCH_CONSTANT                                   ~7      'CURLOPT_USERAGENT'
         10        ADD_ARRAY_ELEMENT                                ~5      'Codular+Sample+cURL+Request', ~7
         11        SEND_VAL_EX                                              ~5
         12        DO_FCALL                                      0          
   10    13        INIT_FCALL_BY_NAME                                       'curl_exec'
         14        SEND_VAR_EX                                              !0
         15        DO_FCALL                                      0  $9      
         16        ASSIGN                                                   !1, $9
   12    17        INIT_FCALL_BY_NAME                                       'curl_close'
         18        SEND_VAR_EX                                              !0
         19        DO_FCALL                                      0          
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.26 ms | 1393 KiB | 13 Q