3v4l.org

run code in 300+ PHP versions simultaneously
<?Php $file_upload="true"; $file_up_size=$_FILES['file_up'][size]; echo $_FILES[file_up][name]; if ($_FILES[file_up][size]>250000){$msg=$msg."Your uploaded file size is more than 250KB so please reduce the file size and then upload.<BR>"; $file_upload="false";} if (!($_FILES[file_up][type] =="image/jpeg" OR $_FILES[file_up][type] =="image/gif")) {$msg=$msg."Your uploaded file must be of JPG or GIF. Other file types are not allowed<BR>"; $file_upload="false";} $file_name=$_FILES[file_up][name]; $add="upload/$file_name"; // the path with the file name where the file will be stored if($file_upload=="true"){ if(move_uploaded_file ($_FILES[file_up][tmp_name], $add)){ // do your coding here to give a thanks message or any other thing. }else{echo "Failed to upload file Contact Site admin to fix the problem";} }else{ echo $msg; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
2 jumps found. (Code = 47) Position 1 = 29, Position 2 = 36
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 41
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 52, Position 2 = 65
Branch analysis from position: 52
2 jumps found. (Code = 43) Position 1 = 62, Position 2 = 63
Branch analysis from position: 62
1 jumps found. (Code = 42) Position 1 = 64
Branch analysis from position: 64
1 jumps found. (Code = 42) Position 1 = 66
Branch analysis from position: 66
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 63
1 jumps found. (Code = 42) Position 1 = 66
Branch analysis from position: 66
Branch analysis from position: 65
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 41
Branch analysis from position: 36
Branch analysis from position: 22
filename:       /in/EMa4H
function name:  (null)
number of ops:  67
compiled vars:  !0 = $file_upload, !1 = $file_up_size, !2 = $msg, !3 = $file_name, !4 = $add
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'true'
    4     1        FETCH_CONSTANT                                   ~8      'size'
          2        FETCH_R                      global              ~6      '_FILES'
          3        FETCH_DIM_R                                      ~7      ~6, 'file_up'
          4        FETCH_DIM_R                                      ~9      ~7, ~8
          5        ASSIGN                                                   !1, ~9
    5     6        FETCH_CONSTANT                                   ~12     'file_up'
          7        FETCH_CONSTANT                                   ~14     'name'
          8        FETCH_R                      global              ~11     '_FILES'
          9        FETCH_DIM_R                                      ~13     ~11, ~12
         10        FETCH_DIM_R                                      ~15     ~13, ~14
         11        ECHO                                                     ~15
    6    12        FETCH_CONSTANT                                   ~17     'file_up'
         13        FETCH_CONSTANT                                   ~19     'size'
         14        FETCH_R                      global              ~16     '_FILES'
         15        FETCH_DIM_R                                      ~18     ~16, ~17
         16        FETCH_DIM_R                                      ~20     ~18, ~19
         17        IS_SMALLER                                               250000, ~20
         18      > JMPZ                                                     ~21, ->22
         19    >   CONCAT                                           ~22     !2, 'Your+uploaded+file+size+is+more+than+250KB%0A+so+please+reduce+the+file+size+and+then+upload.%3CBR%3E'
         20        ASSIGN                                                   !2, ~22
    8    21        ASSIGN                                                   !0, 'false'
   10    22    >   FETCH_CONSTANT                                   ~26     'file_up'
         23        FETCH_CONSTANT                                   ~28     'type'
         24        FETCH_R                      global              ~25     '_FILES'
         25        FETCH_DIM_R                                      ~27     ~25, ~26
         26        FETCH_DIM_R                                      ~29     ~27, ~28
         27        IS_EQUAL                                         ~30     ~29, 'image%2Fjpeg'
         28      > JMPNZ_EX                                         ~30     ~30, ->36
         29    >   FETCH_CONSTANT                                   ~32     'file_up'
         30        FETCH_CONSTANT                                   ~34     'type'
         31        FETCH_R                      global              ~31     '_FILES'
         32        FETCH_DIM_R                                      ~33     ~31, ~32
         33        FETCH_DIM_R                                      ~35     ~33, ~34
         34        IS_EQUAL                                         ~36     ~35, 'image%2Fgif'
         35        BOOL                                             ~30     ~36
         36    >   BOOL_NOT                                         ~37     ~30
         37      > JMPZ                                                     ~37, ->41
   11    38    >   CONCAT                                           ~38     !2, 'Your+uploaded+file+must+be+of+JPG+or+GIF.+Other+file+types+are+not+allowed%3CBR%3E'
         39        ASSIGN                                                   !2, ~38
   12    40        ASSIGN                                                   !0, 'false'
   14    41    >   FETCH_CONSTANT                                   ~42     'file_up'
         42        FETCH_CONSTANT                                   ~44     'name'
         43        FETCH_R                      global              ~41     '_FILES'
         44        FETCH_DIM_R                                      ~43     ~41, ~42
         45        FETCH_DIM_R                                      ~45     ~43, ~44
         46        ASSIGN                                                   !3, ~45
   15    47        NOP                                                      
         48        FAST_CONCAT                                      ~47     'upload%2F', !3
         49        ASSIGN                                                   !4, ~47
   17    50        IS_EQUAL                                                 !0, 'true'
         51      > JMPZ                                                     ~49, ->65
   19    52    >   INIT_FCALL                                               'move_uploaded_file'
         53        FETCH_CONSTANT                                   ~51     'file_up'
         54        FETCH_CONSTANT                                   ~53     'tmp_name'
         55        FETCH_R                      global              ~50     '_FILES'
         56        FETCH_DIM_R                                      ~52     ~50, ~51
         57        FETCH_DIM_R                                      ~54     ~52, ~53
         58        SEND_VAL                                                 ~54
         59        SEND_VAR                                                 !4
         60        DO_ICALL                                         $55     
         61      > JMPZ                                                     $55, ->63
         62    > > JMP                                                      ->64
   21    63    >   ECHO                                                     'Failed+to+upload+file+Contact+Site+admin+to+fix+the+problem'
         64    > > JMP                                                      ->66
   24    65    >   ECHO                                                     !2
   26    66    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.83 ms | 1400 KiB | 15 Q