3v4l.org

run code in 300+ PHP versions simultaneously
<html code ------------------> <?php if (isset($_POST["submit"]) ){ header("Content-Disposition: attachment; filename=\"Report.xls\""); header("Content-Type: application/vnd.ms-excel;"); header("Pragma: no-cache"); header("Expires: 0"); $out = fopen("php://output", "w"); foreach ($tabledata as $data) { //print_r($data); fputcsv($out, $data,"\t"); } fclose($out); } ?> <form name="form_name" method="post" action=""><input type="submit" value="Download Excel" name ="submit" /></form
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 33
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 29
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 29
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
Branch analysis from position: 33
filename:       /in/B6vQ2
function name:  (null)
number of ops:  35
compiled vars:  !0 = $out, !1 = $tabledata, !2 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3Chtml+code+------------------%3E%0A++++++++++++++++'
    3     1        FETCH_IS                                         ~3      '_POST'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~3, 'submit'
          3      > JMPZ                                                     ~4, ->33
    4     4    >   INIT_FCALL                                               'header'
          5        SEND_VAL                                                 'Content-Disposition%3A+attachment%3B+filename%3D%22Report.xls%22'
          6        DO_ICALL                                                 
    5     7        INIT_FCALL                                               'header'
          8        SEND_VAL                                                 'Content-Type%3A+application%2Fvnd.ms-excel%3B'
          9        DO_ICALL                                                 
    6    10        INIT_FCALL                                               'header'
         11        SEND_VAL                                                 'Pragma%3A+no-cache'
         12        DO_ICALL                                                 
    7    13        INIT_FCALL                                               'header'
         14        SEND_VAL                                                 'Expires%3A+0'
         15        DO_ICALL                                                 
    8    16        INIT_FCALL                                               'fopen'
         17        SEND_VAL                                                 'php%3A%2F%2Foutput'
         18        SEND_VAL                                                 'w'
         19        DO_ICALL                                         $9      
         20        ASSIGN                                                   !0, $9
    9    21      > FE_RESET_R                                       $11     !1, ->29
         22    > > FE_FETCH_R                                               $11, !2, ->29
   12    23    >   INIT_FCALL                                               'fputcsv'
         24        SEND_VAR                                                 !0
         25        SEND_VAR                                                 !2
         26        SEND_VAL                                                 '%09'
         27        DO_ICALL                                                 
    9    28      > JMP                                                      ->22
         29    >   FE_FREE                                                  $11
   14    30        INIT_FCALL                                               'fclose'
         31        SEND_VAR                                                 !0
         32        DO_ICALL                                                 
   17    33    >   ECHO                                                     '+++++%3Cform+name%3D%22form_name%22+method%3D%22post%22+action%3D%22%22%3E%3Cinput+type%3D%22submit%22+value%3D%22Download+Excel%22+name+%3D%22submit%22+%2F%3E%3C%2Fform'
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.34 ms | 1401 KiB | 21 Q