3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * Simple file Upload system with PHP. * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * GNU General Public License for more details. * * User NOTE: This is purely NON-DESTRUCTIVE TEST * AT ANY RATE I WILL NOT READ/CUT/DELETE/COPY FILES. * * * * * */ if(isset($_FILES['image'])){ $errors= array(); $file_name = $_FILES['image']['name']; $file_tmp =$_FILES['image']['tmp_name']; $file_type=$_FILES['image']['type']; $file_ext=strtolower(end(explode('.',$_FILES['image']['name']))); if(empty($errors)==true){ move_uploaded_file($file_tmp,''.$file_name); echo "Success"; }else{ print_r($errors); } } ?> <form action="" method="POST" enctype="multipart/form-data"> <input type="file" name="image" /> <input type="submit"/> </form>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 43
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 40
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
filename:       /in/grTmg
function name:  (null)
number of ops:  45
compiled vars:  !0 = $errors, !1 = $file_name, !2 = $file_tmp, !3 = $file_type, !4 = $file_ext
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   FETCH_IS                                         ~5      '_FILES'
          1        ISSET_ISEMPTY_DIM_OBJ                         0          ~5, 'image'
          2      > JMPZ                                                     ~6, ->43
   19     3    >   ASSIGN                                                   !0, <array>
   20     4        FETCH_R                      global              ~8      '_FILES'
          5        FETCH_DIM_R                                      ~9      ~8, 'image'
          6        FETCH_DIM_R                                      ~10     ~9, 'name'
          7        ASSIGN                                                   !1, ~10
   21     8        FETCH_R                      global              ~12     '_FILES'
          9        FETCH_DIM_R                                      ~13     ~12, 'image'
         10        FETCH_DIM_R                                      ~14     ~13, 'tmp_name'
         11        ASSIGN                                                   !2, ~14
   22    12        FETCH_R                      global              ~16     '_FILES'
         13        FETCH_DIM_R                                      ~17     ~16, 'image'
         14        FETCH_DIM_R                                      ~18     ~17, 'type'
         15        ASSIGN                                                   !3, ~18
   23    16        INIT_FCALL                                               'strtolower'
         17        INIT_FCALL                                               'end'
         18        INIT_FCALL                                               'explode'
         19        SEND_VAL                                                 '.'
         20        FETCH_R                      global              ~20     '_FILES'
         21        FETCH_DIM_R                                      ~21     ~20, 'image'
         22        FETCH_DIM_R                                      ~22     ~21, 'name'
         23        SEND_VAL                                                 ~22
         24        DO_ICALL                                         $23     
         25        SEND_VAR_NO_REF                               0          $23
         26        DO_ICALL                                         $24     
         27        SEND_VAR                                                 $24
         28        DO_ICALL                                         $25     
         29        ASSIGN                                                   !4, $25
   26    30        ISSET_ISEMPTY_CV                                 ~27     !0
         31        BOOL                                             ~28     ~27
         32      > JMPZ                                                     ~28, ->40
   27    33    >   INIT_FCALL                                               'move_uploaded_file'
         34        SEND_VAR                                                 !2
         35        CONCAT                                           ~29     '', !1
         36        SEND_VAL                                                 ~29
         37        DO_ICALL                                                 
   28    38        ECHO                                                     'Success'
         39      > JMP                                                      ->43
   30    40    >   INIT_FCALL                                               'print_r'
         41        SEND_VAR                                                 !0
         42        DO_ICALL                                                 
   34    43    >   ECHO                                                     '%0A%3Cform+action%3D%22%22+method%3D%22POST%22+enctype%3D%22multipart%2Fform-data%22%3E%0A%3Cinput+type%3D%22file%22+name%3D%22image%22+%2F%3E%0A%3Cinput+type%3D%22submit%22%2F%3E%0A%3C%2Fform%3E'
   38    44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.69 ms | 1400 KiB | 23 Q