3v4l.org

run code in 300+ PHP versions simultaneously
<?php include('../includes/config.php'); if(isset($_POST['login'])) { if(empty($_POST['username']) && empty($_POST['password'])) { echo 'Please fill all fields!'; } else { $salt = '$2a$06$t9/0hs.mlgssodGR7hLQPO'; $username = mysqli_real_escape_string($con, $_POST['username']); $password = crypt($_POST['password'], $salt); $sql = "SELECT * FROM admin WHERE username='$username' AND password='$password'"; $run_query = mysqli_query($con, $sql); $check_user = mysqli_num_rows($run_query); if(!$check_user) { echo 'Bad username or password!'; } else { header('Location: home/index.php'); } } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 51
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 48
Branch analysis from position: 46
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
Branch analysis from position: 48
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
Branch analysis from position: 51
filename:       /in/r1RM3
function name:  (null)
number of ops:  52
compiled vars:  !0 = $salt, !1 = $username, !2 = $con, !3 = $password, !4 = $sql, !5 = $run_query, !6 = $check_user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INCLUDE_OR_EVAL                                          '..%2Fincludes%2Fconfig.php', INCLUDE
    5     1        FETCH_IS                                         ~8      '_POST'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~8, 'login'
          3      > JMPZ                                                     ~9, ->51
    7     4    >   FETCH_IS                                         ~10     '_POST'
          5        ISSET_ISEMPTY_DIM_OBJ                         1  ~11     ~10, 'username'
          6      > JMPZ_EX                                          ~11     ~11, ->10
          7    >   FETCH_IS                                         ~12     '_POST'
          8        ISSET_ISEMPTY_DIM_OBJ                         1  ~13     ~12, 'password'
          9        BOOL                                             ~11     ~13
         10    > > JMPZ                                                     ~11, ->13
    9    11    >   ECHO                                                     'Please+fill+all+fields%21'
    7    12      > JMP                                                      ->51
   15    13    >   ASSIGN                                                   !0, '%242a%2406%24t9%2F0hs.mlgssodGR7hLQPO'
   17    14        INIT_FCALL_BY_NAME                                       'mysqli_real_escape_string'
         15        SEND_VAR_EX                                              !2
         16        CHECK_FUNC_ARG                                           
         17        FETCH_FUNC_ARG               global              $15     '_POST'
         18        FETCH_DIM_FUNC_ARG                               $16     $15, 'username'
         19        SEND_FUNC_ARG                                            $16
         20        DO_FCALL                                      0  $17     
         21        ASSIGN                                                   !1, $17
   18    22        INIT_FCALL                                               'crypt'
         23        FETCH_R                      global              ~19     '_POST'
         24        FETCH_DIM_R                                      ~20     ~19, 'password'
         25        SEND_VAL                                                 ~20
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                         $21     
         28        ASSIGN                                                   !3, $21
   20    29        ROPE_INIT                                     5  ~24     'SELECT+%2A+FROM+admin+WHERE+username%3D%27'
         30        ROPE_ADD                                      1  ~24     ~24, !1
         31        ROPE_ADD                                      2  ~24     ~24, '%27+AND+password%3D%27'
         32        ROPE_ADD                                      3  ~24     ~24, !3
         33        ROPE_END                                      4  ~23     ~24, '%27'
         34        ASSIGN                                                   !4, ~23
   21    35        INIT_FCALL_BY_NAME                                       'mysqli_query'
         36        SEND_VAR_EX                                              !2
         37        SEND_VAR_EX                                              !4
         38        DO_FCALL                                      0  $28     
         39        ASSIGN                                                   !5, $28
   22    40        INIT_FCALL_BY_NAME                                       'mysqli_num_rows'
         41        SEND_VAR_EX                                              !5
         42        DO_FCALL                                      0  $30     
         43        ASSIGN                                                   !6, $30
   24    44        BOOL_NOT                                         ~32     !6
         45      > JMPZ                                                     ~32, ->48
   26    46    >   ECHO                                                     'Bad+username+or+password%21'
   24    47      > JMP                                                      ->51
   32    48    >   INIT_FCALL                                               'header'
         49        SEND_VAL                                                 'Location%3A+home%2Findex.php'
         50        DO_ICALL                                                 
   40    51    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.6 ms | 1016 KiB | 15 Q