3v4l.org

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

Function eheader:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9Post
function name:  eheader
number of ops:  4
compiled vars:  !0 = $header
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        CONCAT                                           ~1      !0, '%0A'
          2        ECHO                                                     ~1
          3      > RETURN                                                   null

End of function eheader

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
193.23 ms | 1407 KiB | 30 Q