3v4l.org

run code in 300+ PHP versions simultaneously
<?php include "global.php"; ?> <!DOCTYPE html> <!--[if lt IE 7 ]> <html lang="en" class="ie6 ielt8"> <![endif]--> <!--[if IE 7 ]> <html lang="en" class="ie7 ielt8"> <![endif]--> <!--[if IE 8 ]> <html lang="en" class="ie8"> <![endif]--> <!--[if (gte IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]--> <head> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="login.css" /> </head> <body> <div class="container"> <section id="content"> <form method="POST"> <h1><?php echo $SYS_NAAM; ?></h1> <div> <input type="text" placeholder="Gebruikersnaam" required="" name="username" /> </div> <div> <input type="password" placeholder="Wachtwoord" required="" name="password" /> </div> <div> <input type="submit" value="Inloggen!" /> <a href="wachtwoord_vergeten.php">Wachtwoord vergeten?</a> </div> </form><!-- form --> </section><!-- content --> </div><!-- container --> </body> </html> <?php if ($_SERVER['REQUEST_METHOD'] == "POST") { $sql = mysqli_query($c, "SELECT username,password FROM personeel,administrators WHERE username='".mysqli_real_escape_string($c, $_POST['username'])."'AND password='".mysqli_real_escape_string($c, sha1($_POST['password']))."'") ; if ($sql == TRUE) { setcookie("username", $_POST['username'], time()+1800); setcookie("loggedin", TRUE, time()+1800); unset ($_POST); Header ("Location: landing.php"); } else { echo mysqli_error($c); //Hier straks: "Gegevens niet gevonden" van maken } //Sluit COOKIE/REDIRECT/SQL maken af } //sluit IF METHOD POST ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 62
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 58
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 62
Branch analysis from position: 62
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 58
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 62
filename:       /in/7tlUX
function name:  (null)
number of ops:  63
compiled vars:  !0 = $SYS_NAAM, !1 = $sql, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INCLUDE_OR_EVAL                                          'global.php', INCLUDE
    4     1        ECHO                                                     '%3C%21DOCTYPE+html%3E%0A%3C%21--%5Bif+lt+IE+7+%5D%3E+%3Chtml+lang%3D%22en%22+class%3D%22ie6+ielt8%22%3E+%3C%21%5Bendif%5D--%3E%0A%3C%21--%5Bif+IE+7+%5D%3E++++%3Chtml+lang%3D%22en%22+class%3D%22ie7+ielt8%22%3E+%3C%21%5Bendif%5D--%3E%0A%3C%21--%5Bif+IE+8+%5D%3E++++%3Chtml+lang%3D%22en%22+class%3D%22ie8%22%3E+%3C%21%5Bendif%5D--%3E%0A%3C%21--%5Bif+%28gte+IE+9%29%7C%21%28IE%29%5D%3E%3C%21--%3E+%3Chtml+lang%3D%22en%22%3E+%3C%21--%3C%21%5Bendif%5D--%3E%0A%3Chead%3E%0A%3Cmeta+charset%3D%22utf-8%22%3E%0A%0A%3Clink+rel%3D%22stylesheet%22+type%3D%22text%2Fcss%22+href%3D%22login.css%22+%2F%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A%3Cdiv+class%3D%22container%22%3E%0A%09%3Csection+id%3D%22content%22%3E%0A%09%09%3Cform+method%3D%22POST%22%3E%0A%09%09%09%3Ch1%3E'
   18     2        ECHO                                                     !0
          3        ECHO                                                     '%3C%2Fh1%3E%0A%09%09%09%3Cdiv%3E%0A%09%09%09%09%3Cinput+type%3D%22text%22+placeholder%3D%22Gebruikersnaam%22+required%3D%22%22+name%3D%22username%22+%2F%3E%0A%09%09%09%3C%2Fdiv%3E%0A%09%09%09%3Cdiv%3E%0A%09%09%09%09%3Cinput+type%3D%22password%22+placeholder%3D%22Wachtwoord%22+required%3D%22%22+name%3D%22password%22+%2F%3E%0A%09%09%09%3C%2Fdiv%3E%0A%09%09%09%3Cdiv%3E%0A%09%09%09%09%3Cinput+type%3D%22submit%22+value%3D%22Inloggen%21%22+%2F%3E%0A%09%09%09%09%3Ca+href%3D%22wachtwoord_vergeten.php%22%3EWachtwoord+vergeten%3F%3C%2Fa%3E%0A%09%09%09%09%0A%09%09%09%3C%2Fdiv%3E%0A%09%09%3C%2Fform%3E%3C%21--+form+--%3E%0A%0A%09%3C%2Fsection%3E%3C%21--+content+--%3E%0A%3C%2Fdiv%3E%3C%21--+container+--%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E%0A%0A'
   38     4        FETCH_R                      global              ~4      '_SERVER'
          5        FETCH_DIM_R                                      ~5      ~4, 'REQUEST_METHOD'
          6        IS_EQUAL                                                 ~5, 'POST'
          7      > JMPZ                                                     ~6, ->62
   39     8    >   INIT_FCALL_BY_NAME                                       'mysqli_query'
          9        SEND_VAR_EX                                              !2
         10        INIT_FCALL_BY_NAME                                       'mysqli_real_escape_string'
         11        SEND_VAR_EX                                              !2
         12        CHECK_FUNC_ARG                                           
         13        FETCH_FUNC_ARG               global              $7      '_POST'
         14        FETCH_DIM_FUNC_ARG                               $8      $7, 'username'
         15        SEND_FUNC_ARG                                            $8
         16        DO_FCALL                                      0  $9      
         17        CONCAT                                           ~10     'SELECT+username%2Cpassword+FROM+personeel%2Cadministrators+WHERE+username%3D%27', $9
         18        CONCAT                                           ~11     ~10, '%27AND+password%3D%27'
         19        INIT_FCALL_BY_NAME                                       'mysqli_real_escape_string'
         20        SEND_VAR_EX                                              !2
         21        INIT_FCALL                                               'sha1'
         22        FETCH_R                      global              ~12     '_POST'
         23        FETCH_DIM_R                                      ~13     ~12, 'password'
         24        SEND_VAL                                                 ~13
         25        DO_ICALL                                         $14     
         26        SEND_VAR_NO_REF_EX                                       $14
         27        DO_FCALL                                      0  $15     
         28        CONCAT                                           ~16     ~11, $15
         29        CONCAT                                           ~17     ~16, '%27'
         30        SEND_VAL_EX                                              ~17
         31        DO_FCALL                                      0  $18     
         32        ASSIGN                                                   !1, $18
   40    33        BOOL                                             ~20     !1
         34      > JMPZ                                                     ~20, ->58
   41    35    >   INIT_FCALL                                               'setcookie'
         36        SEND_VAL                                                 'username'
         37        FETCH_R                      global              ~21     '_POST'
         38        FETCH_DIM_R                                      ~22     ~21, 'username'
         39        SEND_VAL                                                 ~22
         40        INIT_FCALL                                               'time'
         41        DO_ICALL                                         $23     
         42        ADD                                              ~24     $23, 1800
         43        SEND_VAL                                                 ~24
         44        DO_ICALL                                                 
   42    45        INIT_FCALL                                               'setcookie'
         46        SEND_VAL                                                 'loggedin'
         47        SEND_VAL                                                 <true>
         48        INIT_FCALL                                               'time'
         49        DO_ICALL                                         $26     
         50        ADD                                              ~27     $26, 1800
         51        SEND_VAL                                                 ~27
         52        DO_ICALL                                                 
   43    53        UNSET_VAR                                                '_POST'
   44    54        INIT_FCALL                                               'header'
         55        SEND_VAL                                                 'Location%3A+landing.php'
         56        DO_ICALL                                                 
         57      > JMP                                                      ->62
   46    58    >   INIT_FCALL_BY_NAME                                       'mysqli_error'
         59        SEND_VAR_EX                                              !2
         60        DO_FCALL                                      0  $30     
         61        ECHO                                                     $30
   49    62    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.07 ms | 1404 KiB | 22 Q