3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file = 'monkey.gif'; if (file_exists($file)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename='.basename($file)); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($file)); ob_clean(); flush(); readfile($file); exit; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 42
Branch analysis from position: 5
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PdRCU
function name:  (null)
number of ops:  43
compiled vars:  !0 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'monkey.gif'
    4     1        INIT_FCALL                                               'file_exists'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4      > JMPZ                                                     $2, ->42
    5     5    >   INIT_FCALL                                               'header'
          6        SEND_VAL                                                 'Content-Description%3A+File+Transfer'
          7        DO_ICALL                                                 
    6     8        INIT_FCALL                                               'header'
          9        SEND_VAL                                                 'Content-Type%3A+application%2Foctet-stream'
         10        DO_ICALL                                                 
    7    11        INIT_FCALL                                               'header'
         12        INIT_FCALL                                               'basename'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $5      
         15        CONCAT                                           ~6      'Content-Disposition%3A+attachment%3B+filename%3D', $5
         16        SEND_VAL                                                 ~6
         17        DO_ICALL                                                 
    8    18        INIT_FCALL                                               'header'
         19        SEND_VAL                                                 'Expires%3A+0'
         20        DO_ICALL                                                 
    9    21        INIT_FCALL                                               'header'
         22        SEND_VAL                                                 'Cache-Control%3A+must-revalidate'
         23        DO_ICALL                                                 
   10    24        INIT_FCALL                                               'header'
         25        SEND_VAL                                                 'Pragma%3A+public'
         26        DO_ICALL                                                 
   11    27        INIT_FCALL                                               'header'
         28        INIT_FCALL                                               'filesize'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $11     
         31        CONCAT                                           ~12     'Content-Length%3A+', $11
         32        SEND_VAL                                                 ~12
         33        DO_ICALL                                                 
   12    34        INIT_FCALL                                               'ob_clean'
         35        DO_ICALL                                                 
   13    36        INIT_FCALL                                               'flush'
         37        DO_ICALL                                                 
   14    38        INIT_FCALL                                               'readfile'
         39        SEND_VAR                                                 !0
         40        DO_ICALL                                                 
   15    41      > EXIT                                                     
   17    42    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.71 ms | 1405 KiB | 27 Q