3v4l.org

run code in 300+ PHP versions simultaneously
<?php include 'includes/functions.php'; my_header("Регистрация"); if (!isset($_SESSION[' isLogged ']) == true) { if ($_POST) { $username = trim($_POST['username']); $pass = trim($_POST['pass']) ; $pass2 = trim($_POST['pass2']); $email = trim($_POST['email']); $error_array=array(); if (strlen($username) < 5) { $error_array['username'] = 'Кратко име.Трябва да е поне 4 синвола!'; } if (strlen($pass) < 4) { $error_array['pass'] = 'Кратка парола!'; } if ($pass != $pass2) { $error_array['pass2'] = 'Паролите не въпадат!'; } if (!preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/", $email)) { $error_array['email'] = 'Невалиден Email адрес!'; } if (!preg_match("/^[a-zA-Z0-9_]{5,16}$/", $username)) { $error_array['username'] = 'Невалидно име!'; } if (!isset($error_array) > 0) { $query->query($dbconnect, 'SELECT * FROM users WHERE user_name="'.$username.'" AND user_mail="'.$email.'"'); if ($query->num_rows) { echo '<center><b><h1>Username or Email is busy.Please try again!</h1></b></center>'; header("refresh:2;url=register.php"); exit; } else { mysqli_query($dbconnect, 'INSERT INTO users (user_name,user_pass,user_mail) VALUES("' . addslashes($username) . '","' . addslashes($pass) . '","' . addslashes($email) . '")'); echo '<center><h1><b>Registered is success!</b></h1></center>'; header("refresh:2;url=index.php"); exit; } } else { echo '<center><h1><b>All fields are required!</b></h1></center>'; } } else { echo '<center><h1><b>Registered is not complete!</b></h1></center>'; } } else { echo '<center><h1><b>Вече сте влезли в системата!</h1></b></center>'; header("refresh:2;url=index.php"); exit; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 115
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 113
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 41
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 46
Branch analysis from position: 44
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 50
Branch analysis from position: 48
2 jumps found. (Code = 43) Position 1 = 56, Position 2 = 58
Branch analysis from position: 56
2 jumps found. (Code = 43) Position 1 = 64, Position 2 = 66
Branch analysis from position: 64
2 jumps found. (Code = 43) Position 1 = 70, Position 2 = 111
Branch analysis from position: 70
2 jumps found. (Code = 43) Position 1 = 80, Position 2 = 86
Branch analysis from position: 80
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: 111
1 jumps found. (Code = 42) Position 1 = 114
Branch analysis from position: 114
1 jumps found. (Code = 42) Position 1 = 120
Branch analysis from position: 120
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 66
Branch analysis from position: 58
Branch analysis from position: 50
Branch analysis from position: 46
Branch analysis from position: 41
Branch analysis from position: 113
1 jumps found. (Code = 42) Position 1 = 120
Branch analysis from position: 120
Branch analysis from position: 115
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/LPPVm
function name:  (null)
number of ops:  121
compiled vars:  !0 = $username, !1 = $pass, !2 = $pass2, !3 = $email, !4 = $error_array, !5 = $query, !6 = $dbconnect
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INCLUDE_OR_EVAL                                          'includes%2Ffunctions.php', INCLUDE
    3     1        INIT_FCALL_BY_NAME                                       'my_header'
          2        SEND_VAL_EX                                              '%D0%A0%D0%B5%D0%B3%D0%B8%D1%81%D1%82%D1%80%D0%B0%D1%86%D0%B8%D1%8F'
          3        DO_FCALL                                      0          
    4     4        FETCH_IS                                         ~9      '_SESSION'
          5        ISSET_ISEMPTY_DIM_OBJ                         0  ~10     ~9, '+isLogged+'
          6        BOOL_NOT                                         ~11     ~10
          7        BOOL                                             ~12     ~11
          8      > JMPZ                                                     ~12, ->115
    5     9    >   FETCH_R                      global              ~13     '_POST'
         10      > JMPZ                                                     ~13, ->113
    6    11    >   INIT_FCALL                                               'trim'
         12        FETCH_R                      global              ~14     '_POST'
         13        FETCH_DIM_R                                      ~15     ~14, 'username'
         14        SEND_VAL                                                 ~15
         15        DO_ICALL                                         $16     
         16        ASSIGN                                                   !0, $16
    7    17        INIT_FCALL                                               'trim'
         18        FETCH_R                      global              ~18     '_POST'
         19        FETCH_DIM_R                                      ~19     ~18, 'pass'
         20        SEND_VAL                                                 ~19
         21        DO_ICALL                                         $20     
         22        ASSIGN                                                   !1, $20
    8    23        INIT_FCALL                                               'trim'
         24        FETCH_R                      global              ~22     '_POST'
         25        FETCH_DIM_R                                      ~23     ~22, 'pass2'
         26        SEND_VAL                                                 ~23
         27        DO_ICALL                                         $24     
         28        ASSIGN                                                   !2, $24
    9    29        INIT_FCALL                                               'trim'
         30        FETCH_R                      global              ~26     '_POST'
         31        FETCH_DIM_R                                      ~27     ~26, 'email'
         32        SEND_VAL                                                 ~27
         33        DO_ICALL                                         $28     
         34        ASSIGN                                                   !3, $28
   10    35        ASSIGN                                                   !4, <array>
   11    36        STRLEN                                           ~31     !0
         37        IS_SMALLER                                               ~31, 5
         38      > JMPZ                                                     ~32, ->41
   12    39    >   ASSIGN_DIM                                               !4, 'username'
         40        OP_DATA                                                  '%D0%9A%D1%80%D0%B0%D1%82%D0%BA%D0%BE+%D0%B8%D0%BC%D0%B5.%D0%A2%D1%80%D1%8F%D0%B1%D0%B2%D0%B0+%D0%B4%D0%B0+%D0%B5+%D0%BF%D0%BE%D0%BD%D0%B5+4+%D1%81%D0%B8%D0%BD%D0%B2%D0%BE%D0%BB%D0%B0%21'
   14    41    >   STRLEN                                           ~34     !1
         42        IS_SMALLER                                               ~34, 4
         43      > JMPZ                                                     ~35, ->46
   15    44    >   ASSIGN_DIM                                               !4, 'pass'
         45        OP_DATA                                                  '%D0%9A%D1%80%D0%B0%D1%82%D0%BA%D0%B0+%D0%BF%D0%B0%D1%80%D0%BE%D0%BB%D0%B0%21'
   17    46    >   IS_NOT_EQUAL                                             !1, !2
         47      > JMPZ                                                     ~37, ->50
   18    48    >   ASSIGN_DIM                                               !4, 'pass2'
         49        OP_DATA                                                  '%D0%9F%D0%B0%D1%80%D0%BE%D0%BB%D0%B8%D1%82%D0%B5+%D0%BD%D0%B5+%D0%B2%D1%8A%D0%BF%D0%B0%D0%B4%D0%B0%D1%82%21'
   20    50    >   INIT_FCALL                                               'preg_match'
         51        SEND_VAL                                                 '%2F%5E%28%5Ba-zA-Z0-9%5D%29%2B%28%5Ba-zA-Z0-9%5C._-%5D%29%2A%40%28%5Ba-zA-Z0-9_-%5D%29%2B%28%5Ba-zA-Z0-9%5C._-%5D%2B%29%2B%24%2F'
         52        SEND_VAR                                                 !3
         53        DO_ICALL                                         $39     
         54        BOOL_NOT                                         ~40     $39
         55      > JMPZ                                                     ~40, ->58
   21    56    >   ASSIGN_DIM                                               !4, 'email'
         57        OP_DATA                                                  '%D0%9D%D0%B5%D0%B2%D0%B0%D0%BB%D0%B8%D0%B4%D0%B5%D0%BD+Email+%D0%B0%D0%B4%D1%80%D0%B5%D1%81%21'
   23    58    >   INIT_FCALL                                               'preg_match'
         59        SEND_VAL                                                 '%2F%5E%5Ba-zA-Z0-9_%5D%7B5%2C16%7D%24%2F'
         60        SEND_VAR                                                 !0
         61        DO_ICALL                                         $42     
         62        BOOL_NOT                                         ~43     $42
         63      > JMPZ                                                     ~43, ->66
   24    64    >   ASSIGN_DIM                                               !4, 'username'
         65        OP_DATA                                                  '%D0%9D%D0%B5%D0%B2%D0%B0%D0%BB%D0%B8%D0%B4%D0%BD%D0%BE+%D0%B8%D0%BC%D0%B5%21'
   26    66    >   ISSET_ISEMPTY_CV                                 ~45     !4
         67        BOOL_NOT                                         ~46     ~45
         68        IS_SMALLER                                               0, ~46
         69      > JMPZ                                                     ~47, ->111
   27    70    >   INIT_METHOD_CALL                                         !5, 'query'
         71        SEND_VAR_EX                                              !6
         72        CONCAT                                           ~48     'SELECT+%2A+FROM+users+WHERE+user_name%3D%22', !0
         73        CONCAT                                           ~49     ~48, '%22+AND+user_mail%3D%22'
         74        CONCAT                                           ~50     ~49, !3
         75        CONCAT                                           ~51     ~50, '%22'
         76        SEND_VAL_EX                                              ~51
         77        DO_FCALL                                      0          
   28    78        FETCH_OBJ_R                                      ~53     !5, 'num_rows'
         79      > JMPZ                                                     ~53, ->86
   29    80    >   ECHO                                                     '%3Ccenter%3E%3Cb%3E%3Ch1%3EUsername+or+Email+is+busy.Please+try+again%21%3C%2Fh1%3E%3C%2Fb%3E%3C%2Fcenter%3E'
   30    81        INIT_FCALL                                               'header'
         82        SEND_VAL                                                 'refresh%3A2%3Burl%3Dregister.php'
         83        DO_ICALL                                                 
   31    84      > EXIT                                                     
         85*       JMP                                                      ->110
   33    86    >   INIT_FCALL_BY_NAME                                       'mysqli_query'
         87        SEND_VAR_EX                                              !6
   34    88        INIT_FCALL                                               'addslashes'
         89        SEND_VAR                                                 !0
         90        DO_ICALL                                         $55     
         91        CONCAT                                           ~56     'INSERT+INTO+users+%28user_name%2Cuser_pass%2Cuser_mail%29+%0A++++++++++++++++VALUES%28%22', $55
         92        CONCAT                                           ~57     ~56, '%22%2C%22'
         93        INIT_FCALL                                               'addslashes'
         94        SEND_VAR                                                 !1
         95        DO_ICALL                                         $58     
         96        CONCAT                                           ~59     ~57, $58
         97        CONCAT                                           ~60     ~59, '%22%2C%22'
         98        INIT_FCALL                                               'addslashes'
         99        SEND_VAR                                                 !3
        100        DO_ICALL                                         $61     
        101        CONCAT                                           ~62     ~60, $61
        102        CONCAT                                           ~63     ~62, '%22%29'
        103        SEND_VAL_EX                                              ~63
        104        DO_FCALL                                      0          
   35   105        ECHO                                                     '%3Ccenter%3E%3Ch1%3E%3Cb%3ERegistered+is+success%21%3C%2Fb%3E%3C%2Fh1%3E%3C%2Fcenter%3E'
   36   106        INIT_FCALL                                               'header'
        107        SEND_VAL                                                 'refresh%3A2%3Burl%3Dindex.php'
        108        DO_ICALL                                                 
   37   109      > EXIT                                                     
        110*       JMP                                                      ->112
   40   111    >   ECHO                                                     '%3Ccenter%3E%3Ch1%3E%3Cb%3EAll+fields+are+required%21%3C%2Fb%3E%3C%2Fh1%3E%3C%2Fcenter%3E'
        112      > JMP                                                      ->114
   43   113    >   ECHO                                                     '%3Ccenter%3E%3Ch1%3E%3Cb%3ERegistered+is+not+complete%21%3C%2Fb%3E%3C%2Fh1%3E%3C%2Fcenter%3E'
        114    > > JMP                                                      ->120
   46   115    >   ECHO                                                     '%3Ccenter%3E%3Ch1%3E%3Cb%3E%D0%92%D0%B5%D1%87%D0%B5+%D1%81%D1%82%D0%B5+%D0%B2%D0%BB%D0%B5%D0%B7%D0%BB%D0%B8+%D0%B2+%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BC%D0%B0%D1%82%D0%B0%21%3C%2Fh1%3E%3C%2Fb%3E%3C%2Fcenter%3E'
   47   116        INIT_FCALL                                               'header'
        117        SEND_VAL                                                 'refresh%3A2%3Burl%3Dindex.php'
        118        DO_ICALL                                                 
   48   119      > EXIT                                                     
   49   120    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.76 ms | 1408 KiB | 21 Q