3v4l.org

run code in 300+ PHP versions simultaneously
<?php include "config.php"; // the database configuration file. Update this to connect to your databse //Gets Input from launcher $username = $_POST['username']; //username $password = $_POST['password']; //password $email = $_POST['email']; //email //check if the form was submitted if((isset($_POST['username']) && $_POST['password'] != "")) { //check whether the username and e-mail exist or not $sql="select Name,Email from accounts where Name='".$_POST['username']."'or Email='".$_POST['email']."'"; $results=mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($results)>0) { $row=mysql_fetch_row($results); //check the username if($_POST['username']==$row['0']) { echo 'username='.$_POST['username'].'&password='.$_POST['password']; } //checks the e-mail elseif($_POST['email']==$row['1']) { echo 'username='.$_POST['username'].'&password='.$_POST['password']; } else { //somethings wrong return empty string echo ("username=&password="); } } else //somethings wrong return { //echo ("username=&password="); } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 13, Position 2 = 17
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 75
Branch analysis from position: 18
2 jumps found. (Code = 47) Position 1 = 32, Position 2 = 36
Branch analysis from position: 32
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 36
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 75
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 50, Position 2 = 59
Branch analysis from position: 50
1 jumps found. (Code = 42) Position 1 = 74
Branch analysis from position: 74
1 jumps found. (Code = 42) Position 1 = 75
Branch analysis from position: 75
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 59
2 jumps found. (Code = 43) Position 1 = 64, Position 2 = 73
Branch analysis from position: 64
1 jumps found. (Code = 42) Position 1 = 74
Branch analysis from position: 74
Branch analysis from position: 73
1 jumps found. (Code = 42) Position 1 = 75
Branch analysis from position: 75
Branch analysis from position: 75
Branch analysis from position: 75
Branch analysis from position: 17
filename:       /in/5XtK8
function name:  (null)
number of ops:  76
compiled vars:  !0 = $username, !1 = $password, !2 = $email, !3 = $sql, !4 = $results, !5 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INCLUDE_OR_EVAL                                          'config.php', INCLUDE
    5     1        FETCH_R                      global              ~7      '_POST'
          2        FETCH_DIM_R                                      ~8      ~7, 'username'
          3        ASSIGN                                                   !0, ~8
    6     4        FETCH_R                      global              ~10     '_POST'
          5        FETCH_DIM_R                                      ~11     ~10, 'password'
          6        ASSIGN                                                   !1, ~11
    7     7        FETCH_R                      global              ~13     '_POST'
          8        FETCH_DIM_R                                      ~14     ~13, 'email'
          9        ASSIGN                                                   !2, ~14
   10    10        FETCH_IS                                         ~16     '_POST'
         11        ISSET_ISEMPTY_DIM_OBJ                         0  ~17     ~16, 'username'
         12      > JMPZ_EX                                          ~17     ~17, ->17
         13    >   FETCH_R                      global              ~18     '_POST'
         14        FETCH_DIM_R                                      ~19     ~18, 'password'
         15        IS_NOT_EQUAL                                     ~20     ~19, ''
         16        BOOL                                             ~17     ~20
         17    > > JMPZ                                                     ~17, ->75
   13    18    >   FETCH_R                      global              ~21     '_POST'
         19        FETCH_DIM_R                                      ~22     ~21, 'username'
         20        CONCAT                                           ~23     'select+Name%2CEmail+from+accounts+where+Name%3D%27', ~22
         21        CONCAT                                           ~24     ~23, '%27or+Email%3D%27'
         22        FETCH_R                      global              ~25     '_POST'
         23        FETCH_DIM_R                                      ~26     ~25, 'email'
         24        CONCAT                                           ~27     ~24, ~26
         25        CONCAT                                           ~28     ~27, '%27'
         26        ASSIGN                                                   !3, ~28
   14    27        INIT_FCALL_BY_NAME                                       'mysql_query'
         28        SEND_VAR_EX                                              !3
         29        DO_FCALL                                      0  $30     
         30        ASSIGN                                           ~31     !4, $30
         31      > JMPNZ_EX                                         ~31     ~31, ->36
         32    >   INIT_FCALL_BY_NAME                                       'mysql_error'
         33        DO_FCALL                                      0  $32     
         34      > EXIT                                                     $32
         35*       BOOL                                             ~31     <true>
   15    36    >   INIT_FCALL_BY_NAME                                       'mysql_num_rows'
         37        SEND_VAR_EX                                              !4
         38        DO_FCALL                                      0  $33     
         39        IS_SMALLER                                               0, $33
         40      > JMPZ                                                     ~34, ->75
   17    41    >   INIT_FCALL_BY_NAME                                       'mysql_fetch_row'
         42        SEND_VAR_EX                                              !4
         43        DO_FCALL                                      0  $35     
         44        ASSIGN                                                   !5, $35
   19    45        FETCH_R                      global              ~37     '_POST'
         46        FETCH_DIM_R                                      ~38     ~37, 'username'
         47        FETCH_DIM_R                                      ~39     !5, 0
         48        IS_EQUAL                                                 ~38, ~39
         49      > JMPZ                                                     ~40, ->59
   21    50    >   FETCH_R                      global              ~41     '_POST'
         51        FETCH_DIM_R                                      ~42     ~41, 'username'
         52        CONCAT                                           ~43     'username%3D', ~42
         53        CONCAT                                           ~44     ~43, '%26password%3D'
         54        FETCH_R                      global              ~45     '_POST'
         55        FETCH_DIM_R                                      ~46     ~45, 'password'
         56        CONCAT                                           ~47     ~44, ~46
         57        ECHO                                                     ~47
         58      > JMP                                                      ->74
   24    59    >   FETCH_R                      global              ~48     '_POST'
         60        FETCH_DIM_R                                      ~49     ~48, 'email'
         61        FETCH_DIM_R                                      ~50     !5, 1
         62        IS_EQUAL                                                 ~49, ~50
         63      > JMPZ                                                     ~51, ->73
   26    64    >   FETCH_R                      global              ~52     '_POST'
         65        FETCH_DIM_R                                      ~53     ~52, 'username'
         66        CONCAT                                           ~54     'username%3D', ~53
         67        CONCAT                                           ~55     ~54, '%26password%3D'
         68        FETCH_R                      global              ~56     '_POST'
         69        FETCH_DIM_R                                      ~57     ~56, 'password'
         70        CONCAT                                           ~58     ~55, ~57
         71        ECHO                                                     ~58
         72      > JMP                                                      ->74
   31    73    >   ECHO                                                     'username%3D%26password%3D'
         74    > > JMP                                                      ->75
   40    75    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.25 ms | 1399 KiB | 13 Q