3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_data($url) { $ch = curl_init(); $timeout = 5; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $data = curl_exec($ch); curl_close($ch); return $data; } $returned_content = get_data('http://78.46.104.123:8000/feed/stoc');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2U6dS
function name:  (null)
number of ops:  5
compiled vars:  !0 = $returned_content
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'get_data'
          1        SEND_VAL                                                 'http%3A%2F%2F78.46.104.123%3A8000%2Ffeed%2Fstoc'
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
          4      > RETURN                                                   1

Function get_data:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2U6dS
function name:  get_data
number of ops:  32
compiled vars:  !0 = $url, !1 = $ch, !2 = $timeout, !3 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL_BY_NAME                                       'curl_init'
          2        DO_FCALL                                      0  $4      
          3        ASSIGN                                                   !1, $4
    7     4        ASSIGN                                                   !2, 5
    8     5        INIT_FCALL_BY_NAME                                       'curl_setopt'
          6        SEND_VAR_EX                                              !1
          7        FETCH_CONSTANT                                   ~7      'CURLOPT_URL'
          8        SEND_VAL_EX                                              ~7
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
    9    11        INIT_FCALL_BY_NAME                                       'curl_setopt'
         12        SEND_VAR_EX                                              !1
         13        FETCH_CONSTANT                                   ~9      'CURLOPT_RETURNTRANSFER'
         14        SEND_VAL_EX                                              ~9
         15        SEND_VAL_EX                                              1
         16        DO_FCALL                                      0          
   10    17        INIT_FCALL_BY_NAME                                       'curl_setopt'
         18        SEND_VAR_EX                                              !1
         19        FETCH_CONSTANT                                   ~11     'CURLOPT_CONNECTTIMEOUT'
         20        SEND_VAL_EX                                              ~11
         21        SEND_VAR_EX                                              !2
         22        DO_FCALL                                      0          
   11    23        INIT_FCALL_BY_NAME                                       'curl_exec'
         24        SEND_VAR_EX                                              !1
         25        DO_FCALL                                      0  $13     
         26        ASSIGN                                                   !3, $13
   12    27        INIT_FCALL_BY_NAME                                       'curl_close'
         28        SEND_VAR_EX                                              !1
         29        DO_FCALL                                      0          
   13    30      > RETURN                                                   !3
   14    31*     > RETURN                                                   null

End of function get_data

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.17 ms | 1399 KiB | 14 Q