3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(isset($_POST["submit"])){ if($_POST['formsend']==0){ if($_POST["user"]!="" && $_POST["email"]!="" && $_POST["message"]!=""){ $file=fopen("database.txt","a+"); fwrite($file,$_POST["user"]." ".$_POST["email"]." ".$POST["message"]."\r\n"); fclose($file); } } } ?> <?php $file1=fopen("database.txt","r"); while(!feof($file1)) { echo fgets($file1). "<br> "; } fclose($file1); ?>
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 = 7, Position 2 = 43
Branch analysis from position: 7
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
2 jumps found. (Code = 46) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 43
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
2 jumps found. (Code = 44) Position 1 = 60, Position 2 = 50
Branch analysis from position: 60
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 50
2 jumps found. (Code = 44) Position 1 = 60, Position 2 = 50
Branch analysis from position: 60
Branch analysis from position: 50
Branch analysis from position: 43
Branch analysis from position: 20
Branch analysis from position: 15
Branch analysis from position: 43
Branch analysis from position: 43
filename:       /in/I47QF
function name:  (null)
number of ops:  64
compiled vars:  !0 = $file, !1 = $POST, !2 = $file1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_IS                                         ~3      '_POST'
          1        ISSET_ISEMPTY_DIM_OBJ                         0          ~3, 'submit'
          2      > JMPZ                                                     ~4, ->43
    3     3    >   FETCH_R                      global              ~5      '_POST'
          4        FETCH_DIM_R                                      ~6      ~5, 'formsend'
          5        IS_EQUAL                                                 ~6, 0
          6      > JMPZ                                                     ~7, ->43
    4     7    >   FETCH_R                      global              ~8      '_POST'
          8        FETCH_DIM_R                                      ~9      ~8, 'user'
          9        IS_NOT_EQUAL                                     ~10     ~9, ''
         10      > JMPZ_EX                                          ~10     ~10, ->15
         11    >   FETCH_R                      global              ~11     '_POST'
         12        FETCH_DIM_R                                      ~12     ~11, 'email'
         13        IS_NOT_EQUAL                                     ~13     ~12, ''
         14        BOOL                                             ~10     ~13
         15    > > JMPZ_EX                                          ~10     ~10, ->20
         16    >   FETCH_R                      global              ~14     '_POST'
         17        FETCH_DIM_R                                      ~15     ~14, 'message'
         18        IS_NOT_EQUAL                                     ~16     ~15, ''
         19        BOOL                                             ~10     ~16
         20    > > JMPZ                                                     ~10, ->43
    6    21    >   INIT_FCALL                                               'fopen'
         22        SEND_VAL                                                 'database.txt'
         23        SEND_VAL                                                 'a%2B'
         24        DO_ICALL                                         $17     
         25        ASSIGN                                                   !0, $17
    7    26        INIT_FCALL                                               'fwrite'
         27        SEND_VAR                                                 !0
         28        FETCH_R                      global              ~19     '_POST'
         29        FETCH_DIM_R                                      ~20     ~19, 'user'
         30        CONCAT                                           ~21     ~20, '+'
         31        FETCH_R                      global              ~22     '_POST'
         32        FETCH_DIM_R                                      ~23     ~22, 'email'
         33        CONCAT                                           ~24     ~21, ~23
         34        CONCAT                                           ~25     ~24, '+'
         35        FETCH_DIM_R                                      ~26     !1, 'message'
         36        CONCAT                                           ~27     ~25, ~26
         37        CONCAT                                           ~28     ~27, '%0D%0A'
         38        SEND_VAL                                                 ~28
         39        DO_ICALL                                                 
    8    40        INIT_FCALL                                               'fclose'
         41        SEND_VAR                                                 !0
         42        DO_ICALL                                                 
   13    43    >   ECHO                                                     '%0A'
   15    44        INIT_FCALL                                               'fopen'
         45        SEND_VAL                                                 'database.txt'
         46        SEND_VAL                                                 'r'
         47        DO_ICALL                                         $31     
         48        ASSIGN                                                   !2, $31
   16    49      > JMP                                                      ->55
   18    50    >   INIT_FCALL                                               'fgets'
         51        SEND_VAR                                                 !2
         52        DO_ICALL                                         $33     
         53        CONCAT                                           ~34     $33, '%3Cbr%3E+'
         54        ECHO                                                     ~34
   16    55    >   INIT_FCALL                                               'feof'
         56        SEND_VAR                                                 !2
         57        DO_ICALL                                         $35     
         58        BOOL_NOT                                         ~36     $35
         59      > JMPNZ                                                    ~36, ->50
   20    60    >   INIT_FCALL                                               'fclose'
         61        SEND_VAR                                                 !2
         62        DO_ICALL                                                 
   21    63      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.73 ms | 1400 KiB | 23 Q