3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Defineer functie function error($link) { header('Refresh: 3; url=' . $link.php . ''); } if($_SERVER['REQUEST_METHOD'] == 'POST') // Controle of er op de knop is geklikt. { include_once "connect.php"; // Connectie db. if(!empty($_POST['gebruikersnaam']) AND !empty($_POST['password']) AND !empty($_POST['passwordc']) AND !empty($_POST['mail'])) // Controle op invoeren { if(($_POST['password']) == ($_POST['passwordc'])) // Controle of controle pw overeenkomt met echte pw. { include_once 'uwx3g.php'; // Connectie met salt page. $gebruikersnaam = mysql_real_escape_string($_POST['gebruikersnaam']); //Data veilig maken voor sql injectie d.m.v. mysql_real..... $password = sha1(salt($_POST['password'])); //sha1 hash van pass. Inclusief salt. $mail = mysql_real_escape_string($_POST['mail']); $sql = ("SELECT gebruikersnaam FROM gebruikers WHERE gebruikersnaam='". $gebruikersnaam . "'"); // Controle op gebruikersnaam, zo ja een 1 else en 0 (zie controle bij de volgende if) $uitvoer = mysql_query($sql); //($row = mysql_fetch_assoc($get)) $controle = mysql_num_rows($uitvoer); if($controle == 0) // Als uitvoer is 0 registreren. { mysql_query("INSERT INTO gebruikers (id, gebruikersnaam, password, mail, datum) VALUES ('','" . $gebruikersnaam . "', '" . $password . "', '" . $mail . "', '" . now() . "')"); // Gebruiker in db plaatsen. header('Refresh: 4; url=login.php'); exit ('U bent succesvol aangemeld, u kunt nu inloggen.'); } else { header('Refresh: 2; url=registreren.php'); exit ('Verkeerde gebruikersnaam of wachtwoord.'); // Negatieve melding van ingevoerde gegevens. } } else { error(registreren.php); exit ('De ingevoerde gegevens kloppen niet, u heeft het controle wachtwoord verkeerd ingevuld.'); // Negatieve melding van ingevoerde gegevens. } } else { error(registreren.php); exit ('De ingevoerde gegevens kloppen niet, niet alles is ingevuld.'); // Negatieve melding van ingevoerde gegevens. } } else { error(registreren.php); exit ('U bent op de verkeerde pagina gekomen, U wordt doorverwezen.'); } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 107
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
2 jumps found. (Code = 46) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
2 jumps found. (Code = 46) Position 1 = 19, Position 2 = 23
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 99
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 91
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 68, Position 2 = 86
Branch analysis from position: 68
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 86
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 91
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 99
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 23
Branch analysis from position: 18
Branch analysis from position: 13
Branch analysis from position: 107
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/JvDOA
function name:  (null)
number of ops:  115
compiled vars:  !0 = $gebruikersnaam, !1 = $password, !2 = $mail, !3 = $sql, !4 = $uitvoer, !5 = $controle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_R                      global              ~6      '_SERVER'
          1        FETCH_DIM_R                                      ~7      ~6, 'REQUEST_METHOD'
          2        IS_EQUAL                                                 ~7, 'POST'
          3      > JMPZ                                                     ~8, ->107
   12     4    >   INCLUDE_OR_EVAL                                          'connect.php', INCLUDE_ONCE
   13     5        FETCH_IS                                         ~10     '_POST'
          6        ISSET_ISEMPTY_DIM_OBJ                         1  ~11     ~10, 'gebruikersnaam'
          7        BOOL_NOT                                         ~12     ~11
          8      > JMPZ_EX                                          ~12     ~12, ->13
          9    >   FETCH_IS                                         ~13     '_POST'
         10        ISSET_ISEMPTY_DIM_OBJ                         1  ~14     ~13, 'password'
         11        BOOL_NOT                                         ~15     ~14
         12        BOOL                                             ~12     ~15
         13    > > JMPZ_EX                                          ~12     ~12, ->18
         14    >   FETCH_IS                                         ~16     '_POST'
         15        ISSET_ISEMPTY_DIM_OBJ                         1  ~17     ~16, 'passwordc'
         16        BOOL_NOT                                         ~18     ~17
         17        BOOL                                             ~12     ~18
         18    > > JMPZ_EX                                          ~12     ~12, ->23
         19    >   FETCH_IS                                         ~19     '_POST'
         20        ISSET_ISEMPTY_DIM_OBJ                         1  ~20     ~19, 'mail'
         21        BOOL_NOT                                         ~21     ~20
         22        BOOL                                             ~12     ~21
         23    > > JMPZ                                                     ~12, ->99
   15    24    >   FETCH_R                      global              ~22     '_POST'
         25        FETCH_DIM_R                                      ~23     ~22, 'password'
         26        FETCH_R                      global              ~24     '_POST'
         27        FETCH_DIM_R                                      ~25     ~24, 'passwordc'
         28        IS_EQUAL                                                 ~23, ~25
         29      > JMPZ                                                     ~26, ->91
   18    30    >   INCLUDE_OR_EVAL                                          'uwx3g.php', INCLUDE_ONCE
   19    31        INIT_FCALL_BY_NAME                                       'mysql_real_escape_string'
         32        CHECK_FUNC_ARG                                           
         33        FETCH_FUNC_ARG               global              $28     '_POST'
         34        FETCH_DIM_FUNC_ARG                               $29     $28, 'gebruikersnaam'
         35        SEND_FUNC_ARG                                            $29
         36        DO_FCALL                                      0  $30     
         37        ASSIGN                                                   !0, $30
   20    38        INIT_FCALL                                               'sha1'
         39        INIT_FCALL_BY_NAME                                       'salt'
         40        CHECK_FUNC_ARG                                           
         41        FETCH_FUNC_ARG               global              $32     '_POST'
         42        FETCH_DIM_FUNC_ARG                               $33     $32, 'password'
         43        SEND_FUNC_ARG                                            $33
         44        DO_FCALL                                      0  $34     
         45        SEND_VAR                                                 $34
         46        DO_ICALL                                         $35     
         47        ASSIGN                                                   !1, $35
   21    48        INIT_FCALL_BY_NAME                                       'mysql_real_escape_string'
         49        CHECK_FUNC_ARG                                           
         50        FETCH_FUNC_ARG               global              $37     '_POST'
         51        FETCH_DIM_FUNC_ARG                               $38     $37, 'mail'
         52        SEND_FUNC_ARG                                            $38
         53        DO_FCALL                                      0  $39     
         54        ASSIGN                                                   !2, $39
   22    55        CONCAT                                           ~41     'SELECT+gebruikersnaam+FROM+gebruikers+WHERE+gebruikersnaam%3D%27', !0
         56        CONCAT                                           ~42     ~41, '%27'
         57        ASSIGN                                                   !3, ~42
   23    58        INIT_FCALL_BY_NAME                                       'mysql_query'
         59        SEND_VAR_EX                                              !3
         60        DO_FCALL                                      0  $44     
         61        ASSIGN                                                   !4, $44
   25    62        INIT_FCALL_BY_NAME                                       'mysql_num_rows'
         63        SEND_VAR_EX                                              !4
         64        DO_FCALL                                      0  $46     
         65        ASSIGN                                                   !5, $46
   27    66        IS_EQUAL                                                 !5, 0
         67      > JMPZ                                                     ~48, ->86
   29    68    >   INIT_FCALL_BY_NAME                                       'mysql_query'
         69        CONCAT                                           ~49     'INSERT+INTO+gebruikers+%28id%2C+gebruikersnaam%2C+password%2C+mail%2C+datum%29+VALUES+%28%27%27%2C%27', !0
         70        CONCAT                                           ~50     ~49, '%27%2C+%27'
         71        CONCAT                                           ~51     ~50, !1
         72        CONCAT                                           ~52     ~51, '%27%2C+%27'
         73        CONCAT                                           ~53     ~52, !2
         74        CONCAT                                           ~54     ~53, '%27%2C+%27'
         75        INIT_FCALL_BY_NAME                                       'now'
         76        DO_FCALL                                      0  $55     
         77        CONCAT                                           ~56     ~54, $55
         78        CONCAT                                           ~57     ~56, '%27%29'
         79        SEND_VAL_EX                                              ~57
         80        DO_FCALL                                      0          
   30    81        INIT_FCALL                                               'header'
         82        SEND_VAL                                                 'Refresh%3A+4%3B+url%3Dlogin.php'
         83        DO_ICALL                                                 
   31    84      > EXIT                                                     'U+bent+succesvol+aangemeld%2C+u+kunt+nu+inloggen.'
         85*       JMP                                                      ->90
   35    86    >   INIT_FCALL                                               'header'
         87        SEND_VAL                                                 'Refresh%3A+2%3B+url%3Dregistreren.php'
         88        DO_ICALL                                                 
   36    89      > EXIT                                                     'Verkeerde+gebruikersnaam+of+wachtwoord.'
         90*       JMP                                                      ->98
   41    91    >   INIT_FCALL                                               'error'
         92        FETCH_CONSTANT                                   ~61     'registreren'
         93        FETCH_CONSTANT                                   ~62     'php'
         94        CONCAT                                           ~63     ~61, ~62
         95        SEND_VAL                                                 ~63
         96        DO_FCALL                                      0          
   42    97      > EXIT                                                     'De+ingevoerde+gegevens+kloppen+niet%2C+u+heeft+het+controle+wachtwoord+verkeerd+ingevuld.'
         98*       JMP                                                      ->106
   47    99    >   INIT_FCALL                                               'error'
        100        FETCH_CONSTANT                                   ~65     'registreren'
        101        FETCH_CONSTANT                                   ~66     'php'
        102        CONCAT                                           ~67     ~65, ~66
        103        SEND_VAL                                                 ~67
        104        DO_FCALL                                      0          
   48   105      > EXIT                                                     'De+ingevoerde+gegevens+kloppen+niet%2C+niet+alles+is+ingevuld.'
        106*       JMP                                                      ->114
   56   107    >   INIT_FCALL                                               'error'
        108        FETCH_CONSTANT                                   ~69     'registreren'
        109        FETCH_CONSTANT                                   ~70     'php'
        110        CONCAT                                           ~71     ~69, ~70
        111        SEND_VAL                                                 ~71
        112        DO_FCALL                                      0          
   57   113      > EXIT                                                     'U+bent+op+de+verkeerde+pagina+gekomen%2C+U+wordt+doorverwezen.'
   60   114*     > RETURN                                                   1

Function error:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JvDOA
function name:  error
number of ops:  9
compiled vars:  !0 = $link
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'header'
          2        CONCAT                                           ~1      'Refresh%3A+3%3B+url%3D', !0
          3        FETCH_CONSTANT                                   ~2      'php'
          4        CONCAT                                           ~3      ~1, ~2
          5        CONCAT                                           ~4      ~3, ''
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
    7     8      > RETURN                                                   null

End of function error

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.36 ms | 1411 KiB | 20 Q