3v4l.org

run code in 300+ PHP versions simultaneously
<html> <body> <form action="upload_file.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file" size="20" /><br /> <input type="submit" name="submit" value="Submit" /> </form> </body> </html> <?php if (file_exists("upload/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { move_uploaded_file($_FILES["file"]["tmp_name"],"upload/" . $_FILES["file"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file"]["name"]; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eo8QM
function name:  (null)
number of ops:  32
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3Chtml%3E%0A%3Cbody%3E%0A%3Cform+action%3D%22upload_file.php%22+method%3D%22post%22+enctype%3D%22multipart%2Fform-data%22%3E%0A%3Clabel+for%3D%22file%22%3EFilename%3A%3C%2Flabel%3E%0A%3Cinput+type%3D%22file%22+name%3D%22file%22+id%3D%22file%22+size%3D%2220%22+%2F%3E%3Cbr+%2F%3E%0A%3Cinput+type%3D%22submit%22+name%3D%22submit%22+value%3D%22Submit%22+%2F%3E%0A%3C%2Fform%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E%0A'
   11     1        INIT_FCALL                                               'file_exists'
          2        FETCH_R                      global              ~0      '_FILES'
          3        FETCH_DIM_R                                      ~1      ~0, 'file'
          4        FETCH_DIM_R                                      ~2      ~1, 'name'
          5        CONCAT                                           ~3      'upload%2F', ~2
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                         $4      
          8      > JMPZ                                                     $4, ->15
   13     9    >   FETCH_R                      global              ~5      '_FILES'
         10        FETCH_DIM_R                                      ~6      ~5, 'file'
         11        FETCH_DIM_R                                      ~7      ~6, 'name'
         12        CONCAT                                           ~8      ~7, '+already+exists.+'
         13        ECHO                                                     ~8
         14      > JMP                                                      ->31
   17    15    >   INIT_FCALL                                               'move_uploaded_file'
         16        FETCH_R                      global              ~9      '_FILES'
         17        FETCH_DIM_R                                      ~10     ~9, 'file'
         18        FETCH_DIM_R                                      ~11     ~10, 'tmp_name'
         19        SEND_VAL                                                 ~11
         20        FETCH_R                      global              ~12     '_FILES'
         21        FETCH_DIM_R                                      ~13     ~12, 'file'
         22        FETCH_DIM_R                                      ~14     ~13, 'name'
         23        CONCAT                                           ~15     'upload%2F', ~14
         24        SEND_VAL                                                 ~15
         25        DO_ICALL                                                 
   18    26        FETCH_R                      global              ~17     '_FILES'
         27        FETCH_DIM_R                                      ~18     ~17, 'file'
         28        FETCH_DIM_R                                      ~19     ~18, 'name'
         29        CONCAT                                           ~20     'Stored+in%3A+upload%2F', ~19
         30        ECHO                                                     ~20
   20    31    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.37 ms | 1400 KiB | 17 Q