3v4l.org

run code in 300+ PHP versions simultaneously
<?php // We didn't check $_POST['password'], it could be anything the user wanted! For example: $username = 'aidan'; $password = "' OR ''='"; // Query database to check if there are any matching users $query = "SELECT * FROM users WHERE user='{$_POST['username']}' AND password='{$_POST['password']}'"; // This means the query sent to MySQL would be: echo $query; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i3Ded
function name:  (null)
number of ops:  14
compiled vars:  !0 = $username, !1 = $password, !2 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'aidan'
    4     1        ASSIGN                                                   !1, '%27+OR+%27%27%3D%27'
    7     2        ROPE_INIT                                     5  ~10     'SELECT+%2A+FROM+users+WHERE+user%3D%27'
          3        FETCH_R                      global              ~5      '_POST'
          4        FETCH_DIM_R                                      ~6      ~5, 'username'
          5        ROPE_ADD                                      1  ~10     ~10, ~6
          6        ROPE_ADD                                      2  ~10     ~10, '%27+AND+password%3D%27'
          7        FETCH_R                      global              ~7      '_POST'
          8        FETCH_DIM_R                                      ~8      ~7, 'password'
          9        ROPE_ADD                                      3  ~10     ~10, ~8
         10        ROPE_END                                      4  ~9      ~10, '%27'
         11        ASSIGN                                                   !2, ~9
   10    12        ECHO                                                     !2
   11    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.71 ms | 1393 KiB | 13 Q