3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getResource($url, $postParams) { $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_POSTFIELDS, $postParams); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLINFO_HEADER_OUT, true); curl_setopt($curl, CURLOPT_REFERER, true); curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate'); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($curl); $info = curl_getinfo($curl); curl_close($curl); if ($info['http_code'] != 200) { return false; } return $result; } getResource('http://www.tntvillage.scambioetico.org/?releaselist', 'cat=1&page=1&srcrel=person of');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/994s6
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_FCALL                                               'getresource'
          1        SEND_VAL                                                 'http%3A%2F%2Fwww.tntvillage.scambioetico.org%2F%3Freleaselist'
          2        SEND_VAL                                                 'cat%3D1%26page%3D1%26srcrel%3Dperson+of'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function getresource:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 67, Position 2 = 68
Branch analysis from position: 67
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 68
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/994s6
function name:  getResource
number of ops:  70
compiled vars:  !0 = $url, !1 = $postParams, !2 = $curl, !3 = $result, !4 = $info
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_FCALL_BY_NAME                                       'curl_init'
          3        DO_FCALL                                      0  $5      
          4        ASSIGN                                                   !2, $5
    6     5        INIT_FCALL_BY_NAME                                       'curl_setopt'
          6        SEND_VAR_EX                                              !2
          7        FETCH_CONSTANT                                   ~7      'CURLOPT_URL'
          8        SEND_VAL_EX                                              ~7
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
    7    11        INIT_FCALL_BY_NAME                                       'curl_setopt'
         12        SEND_VAR_EX                                              !2
         13        FETCH_CONSTANT                                   ~9      'CURLOPT_POSTFIELDS'
         14        SEND_VAL_EX                                              ~9
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0          
    8    17        INIT_FCALL_BY_NAME                                       'curl_setopt'
         18        SEND_VAR_EX                                              !2
         19        FETCH_CONSTANT                                   ~11     'CURLOPT_FOLLOWLOCATION'
         20        SEND_VAL_EX                                              ~11
         21        SEND_VAL_EX                                              <true>
         22        DO_FCALL                                      0          
    9    23        INIT_FCALL_BY_NAME                                       'curl_setopt'
         24        SEND_VAR_EX                                              !2
         25        FETCH_CONSTANT                                   ~13     'CURLOPT_RETURNTRANSFER'
         26        SEND_VAL_EX                                              ~13
         27        SEND_VAL_EX                                              <true>
         28        DO_FCALL                                      0          
   10    29        INIT_FCALL_BY_NAME                                       'curl_setopt'
         30        SEND_VAR_EX                                              !2
         31        FETCH_CONSTANT                                   ~15     'CURLINFO_HEADER_OUT'
         32        SEND_VAL_EX                                              ~15
         33        SEND_VAL_EX                                              <true>
         34        DO_FCALL                                      0          
   11    35        INIT_FCALL_BY_NAME                                       'curl_setopt'
         36        SEND_VAR_EX                                              !2
         37        FETCH_CONSTANT                                   ~17     'CURLOPT_REFERER'
         38        SEND_VAL_EX                                              ~17
         39        SEND_VAL_EX                                              <true>
         40        DO_FCALL                                      0          
   12    41        INIT_FCALL_BY_NAME                                       'curl_setopt'
         42        SEND_VAR_EX                                              !2
         43        FETCH_CONSTANT                                   ~19     'CURLOPT_ENCODING'
         44        SEND_VAL_EX                                              ~19
         45        SEND_VAL_EX                                              'gzip%2Cdeflate'
         46        DO_FCALL                                      0          
   13    47        INIT_FCALL_BY_NAME                                       'curl_setopt'
         48        SEND_VAR_EX                                              !2
         49        FETCH_CONSTANT                                   ~21     'CURLOPT_RETURNTRANSFER'
         50        SEND_VAL_EX                                              ~21
         51        SEND_VAL_EX                                              1
         52        DO_FCALL                                      0          
   14    53        INIT_FCALL_BY_NAME                                       'curl_exec'
         54        SEND_VAR_EX                                              !2
         55        DO_FCALL                                      0  $23     
         56        ASSIGN                                                   !3, $23
   15    57        INIT_FCALL_BY_NAME                                       'curl_getinfo'
         58        SEND_VAR_EX                                              !2
         59        DO_FCALL                                      0  $25     
         60        ASSIGN                                                   !4, $25
   16    61        INIT_FCALL_BY_NAME                                       'curl_close'
         62        SEND_VAR_EX                                              !2
         63        DO_FCALL                                      0          
   17    64        FETCH_DIM_R                                      ~28     !4, 'http_code'
         65        IS_NOT_EQUAL                                             ~28, 200
         66      > JMPZ                                                     ~29, ->68
   18    67    > > RETURN                                                   <false>
   20    68    > > RETURN                                                   !3
   21    69*     > RETURN                                                   null

End of function getresource

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.22 ms | 1403 KiB | 14 Q