3v4l.org

run code in 300+ PHP versions simultaneously
<?php $con=mysqli_connect("sql6.freemysqlhosting.net","sql691953","xA9!eC2!","sql691953"); if (mysqli_connect_errno($con)) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $username = $_POST['username']; $password = $_POST['password']; $result = mysqli_query($con,"SELECT Role FROM table1 where Username='$username' and Password='$password'"); $row = mysqli_fetch_array($result); $data = $row[0]; if($data){ echo $data; } mysqli_close($con); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 39
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
Branch analysis from position: 15
filename:       /in/qOfEJ
function name:  (null)
number of ops:  43
compiled vars:  !0 = $con, !1 = $username, !2 = $password, !3 = $result, !4 = $row, !5 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'mysqli_connect'
          1        SEND_VAL_EX                                              'sql6.freemysqlhosting.net'
          2        SEND_VAL_EX                                              'sql691953'
          3        SEND_VAL_EX                                              'xA9%21eC2%21'
          4        SEND_VAL_EX                                              'sql691953'
          5        DO_FCALL                                      0  $6      
          6        ASSIGN                                                   !0, $6
    4     7        INIT_FCALL_BY_NAME                                       'mysqli_connect_errno'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0  $8      
         10      > JMPZ                                                     $8, ->15
    6    11    >   INIT_FCALL_BY_NAME                                       'mysqli_connect_error'
         12        DO_FCALL                                      0  $9      
         13        CONCAT                                           ~10     'Failed+to+connect+to+MySQL%3A+', $9
         14        ECHO                                                     ~10
    8    15    >   FETCH_R                      global              ~11     '_POST'
         16        FETCH_DIM_R                                      ~12     ~11, 'username'
         17        ASSIGN                                                   !1, ~12
    9    18        FETCH_R                      global              ~14     '_POST'
         19        FETCH_DIM_R                                      ~15     ~14, 'password'
         20        ASSIGN                                                   !2, ~15
   10    21        INIT_FCALL_BY_NAME                                       'mysqli_query'
         22        SEND_VAR_EX                                              !0
         23        ROPE_INIT                                     5  ~18     'SELECT+Role+FROM+table1+where+%0AUsername%3D%27'
   11    24        ROPE_ADD                                      1  ~18     ~18, !1
         25        ROPE_ADD                                      2  ~18     ~18, '%27+and+Password%3D%27'
         26        ROPE_ADD                                      3  ~18     ~18, !2
         27        ROPE_END                                      4  ~17     ~18, '%27'
         28        SEND_VAL_EX                                              ~17
         29        DO_FCALL                                      0  $21     
   10    30        ASSIGN                                                   !3, $21
   12    31        INIT_FCALL_BY_NAME                                       'mysqli_fetch_array'
         32        SEND_VAR_EX                                              !3
         33        DO_FCALL                                      0  $23     
         34        ASSIGN                                                   !4, $23
   13    35        FETCH_DIM_R                                      ~25     !4, 0
         36        ASSIGN                                                   !5, ~25
   15    37      > JMPZ                                                     !5, ->39
   16    38    >   ECHO                                                     !5
   18    39    >   INIT_FCALL_BY_NAME                                       'mysqli_close'
         40        SEND_VAR_EX                                              !0
         41        DO_FCALL                                      0          
   19    42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.54 ms | 1403 KiB | 13 Q