3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Downloading... "; $json = file_get_contents('http://m.vip.com/ajaxapi-classify.html?query=27967&limit=10000'); echo "[O.K.]\n"; $obj = json_decode($json); echo (float)$obj->data[0]->discount; if (file_exists($obj)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="test.txt"'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($obj)); readfile($obj); exit; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 48
Branch analysis from position: 19
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 48
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K424O
function name:  (null)
number of ops:  49
compiled vars:  !0 = $json, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     'Downloading...%09'
    3     1        INIT_FCALL                                               'file_get_contents'
          2        SEND_VAL                                                 'http%3A%2F%2Fm.vip.com%2Fajaxapi-classify.html%3Fquery%3D27967%26limit%3D10000'
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    4     5        ECHO                                                     '%5BO.K.%5D%0A'
    5     6        INIT_FCALL                                               'json_decode'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !1, $4
    6    10        FETCH_OBJ_R                                      ~6      !1, 'data'
         11        FETCH_DIM_R                                      ~7      ~6, 0
         12        FETCH_OBJ_R                                      ~8      ~7, 'discount'
         13        CAST                                          5  ~9      ~8
         14        ECHO                                                     ~9
    9    15        INIT_FCALL                                               'file_exists'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $10     
         18      > JMPZ                                                     $10, ->48
   10    19    >   INIT_FCALL                                               'header'
         20        SEND_VAL                                                 'Content-Description%3A+File+Transfer'
         21        DO_ICALL                                                 
   11    22        INIT_FCALL                                               'header'
         23        SEND_VAL                                                 'Content-Type%3A+application%2Foctet-stream'
         24        DO_ICALL                                                 
   12    25        INIT_FCALL                                               'header'
         26        SEND_VAL                                                 'Content-Disposition%3A+attachment%3B+filename%3D%22test.txt%22'
         27        DO_ICALL                                                 
   13    28        INIT_FCALL                                               'header'
         29        SEND_VAL                                                 'Expires%3A+0'
         30        DO_ICALL                                                 
   14    31        INIT_FCALL                                               'header'
         32        SEND_VAL                                                 'Cache-Control%3A+must-revalidate'
         33        DO_ICALL                                                 
   15    34        INIT_FCALL                                               'header'
         35        SEND_VAL                                                 'Pragma%3A+public'
         36        DO_ICALL                                                 
   16    37        INIT_FCALL                                               'header'
         38        INIT_FCALL                                               'filesize'
         39        SEND_VAR                                                 !1
         40        DO_ICALL                                         $17     
         41        CONCAT                                           ~18     'Content-Length%3A+', $17
         42        SEND_VAL                                                 ~18
         43        DO_ICALL                                                 
   17    44        INIT_FCALL                                               'readfile'
         45        SEND_VAR                                                 !1
         46        DO_ICALL                                                 
   18    47      > EXIT                                                     
   21    48    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.34 ms | 1400 KiB | 25 Q