3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getStr($string,$start,$end){ $str = explode($start,$string); $str = explode($end,$str[1]); return $str[0]; } $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.getproxylist.com/proxy?country=BR", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", // CURLOPT_POSTFIELDS => array( // "X-Mashape-Key" => "wQocH1wdCVmshfMaA4oY19xst3H1p1qNljIjsnusupjaYacLWe", // "Accept" => "application/json" // ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { //echo $response; } $token = getStr($response, ', "ip": "',', "port":',', "'); echo $token; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 37
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/k73et
function name:  (null)
number of ops:  46
compiled vars:  !0 = $curl, !1 = $response, !2 = $err, !3 = $token
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL_BY_NAME                                       'curl_init'
          1        DO_FCALL                                      0  $4      
          2        ASSIGN                                                   !0, $4
   11     3        INIT_FCALL_BY_NAME                                       'curl_setopt_array'
          4        SEND_VAR_EX                                              !0
   12     5        FETCH_CONSTANT                                   ~6      'CURLOPT_URL'
          6        INIT_ARRAY                                       ~7      'https%3A%2F%2Fapi.getproxylist.com%2Fproxy%3Fcountry%3DBR', ~6
   13     7        FETCH_CONSTANT                                   ~8      'CURLOPT_RETURNTRANSFER'
   12     8        ADD_ARRAY_ELEMENT                                ~7      <true>, ~8
   14     9        FETCH_CONSTANT                                   ~9      'CURLOPT_ENCODING'
         10        ADD_ARRAY_ELEMENT                                ~7      '', ~9
   15    11        FETCH_CONSTANT                                   ~10     'CURLOPT_MAXREDIRS'
         12        ADD_ARRAY_ELEMENT                                ~7      10, ~10
   16    13        FETCH_CONSTANT                                   ~11     'CURLOPT_TIMEOUT'
         14        ADD_ARRAY_ELEMENT                                ~7      30, ~11
   17    15        FETCH_CONSTANT                                   ~12     'CURLOPT_HTTP_VERSION'
         16        FETCH_CONSTANT                                   ~13     'CURL_HTTP_VERSION_1_1'
         17        ADD_ARRAY_ELEMENT                                ~7      ~13, ~12
   18    18        FETCH_CONSTANT                                   ~14     'CURLOPT_CUSTOMREQUEST'
         19        ADD_ARRAY_ELEMENT                                ~7      'GET', ~14
         20        SEND_VAL_EX                                              ~7
   11    21        DO_FCALL                                      0          
   27    22        INIT_FCALL_BY_NAME                                       'curl_exec'
         23        SEND_VAR_EX                                              !0
         24        DO_FCALL                                      0  $16     
         25        ASSIGN                                                   !1, $16
   28    26        INIT_FCALL_BY_NAME                                       'curl_error'
         27        SEND_VAR_EX                                              !0
         28        DO_FCALL                                      0  $18     
         29        ASSIGN                                                   !2, $18
   30    30        INIT_FCALL_BY_NAME                                       'curl_close'
         31        SEND_VAR_EX                                              !0
         32        DO_FCALL                                      0          
   32    33      > JMPZ                                                     !2, ->37
   33    34    >   CONCAT                                           ~21     'cURL+Error+%23%3A', !2
         35        ECHO                                                     ~21
   32    36      > JMP                                                      ->37
   38    37    >   INIT_FCALL                                               'getstr'
         38        SEND_VAR                                                 !1
         39        SEND_VAL                                                 '%2C+%22ip%22%3A+%22'
         40        SEND_VAL                                                 '%2C+%22port%22%3A'
         41        SEND_VAL                                                 '%2C+%22'
         42        DO_FCALL                                      0  $22     
         43        ASSIGN                                                   !3, $22
   39    44        ECHO                                                     !3
   40    45      > RETURN                                                   1

Function getstr:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k73et
function name:  getStr
number of ops:  17
compiled vars:  !0 = $string, !1 = $start, !2 = $end, !3 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    4     3        INIT_FCALL                                               'explode'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !3, $4
    5     8        INIT_FCALL                                               'explode'
          9        SEND_VAR                                                 !2
         10        FETCH_DIM_R                                      ~6      !3, 1
         11        SEND_VAL                                                 ~6
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !3, $7
    6    14        FETCH_DIM_R                                      ~9      !3, 0
         15      > RETURN                                                   ~9
    7    16*     > RETURN                                                   null

End of function getstr

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.92 ms | 1458 KiB | 15 Q