3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(session_start()) { ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>Registration</title> <link rel="stylesheet" href="style.css"/> </head> <body> <?php $_REQUEST = array('username' => 'io', 'check' => 'Register'); // When form submitted, insert values into the database. if (isset($_REQUEST['check'])) { //require('db.php'); // removes backslashes /*$username = stripslashes($_REQUEST['username']); //escapes special characters in a string $username = mysqli_real_escape_string($con, $username); $email = stripslashes($_REQUEST['email']); $email = mysqli_real_escape_string($con, $email); $password = stripslashes($_REQUEST['password']); $password = mysqli_real_escape_string($con, $password); $create_datetime = date("Y-m-d H:i:s"); $query = "INSERT into `users` (username, password, email, create_datetime) VALUES ('$username', '" . md5($password) . "', '$email', '$create_datetime')"; $result = mysqli_query($con, $query);*/ $result = true; if ($result) { ?> <div class="form"> <h3>You are registered successfully.</h3><br/> <p class="link">Click here to <a href="login.php">Login</a></p> </div> <?php } else { ?> <div class="form"> <h3>Required fields are missing.</h3><br/> <p class="link">Click here to <a href="registration.php">registration</a> again.</p> </div> <?php } } else { ?> <form class="form" action="" method="post"> <h1 class="login-title">Registration</h1> <input type="text" class="login-input" name="username" placeholder="Username" required /> <input type="text" class="login-input" name="email" placeholder="Email Adress"> <input type="password" class="login-input" name="password" placeholder="Password"> <input type="submit" name="check" value="Register" class="login-button"> <p class="link">Already have an account? <a href="login.php">Login here</a></p> </form> <?php } } else { echo 'Session not work'; } ?> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qsB9K
function name:  (null)
number of ops:  20
compiled vars:  !0 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'session_start'
          1        DO_ICALL                                         $1      
          2      > JMPZ                                                     $1, ->17
    4     3    >   ECHO                                                     '%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%0A%3Chead%3E%0A++++%3Cmeta+charset%3D%22utf-8%22%2F%3E%0A++++%3Ctitle%3ERegistration%3C%2Ftitle%3E%0A++++%3Clink+rel%3D%22stylesheet%22+href%3D%22style.css%22%2F%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A'
   13     4        FETCH_W                      global              $2      '_REQUEST'
          5        ASSIGN                                                   $2, <array>
   15     6        FETCH_IS                                         ~4      '_REQUEST'
          7        ISSET_ISEMPTY_DIM_OBJ                         0          ~4, 'check'
          8      > JMPZ                                                     ~5, ->15
   29     9    >   ASSIGN                                                   !0, <true>
   30    10      > JMPZ                                                     !0, ->13
   32    11    >   ECHO                                                     '++++++++++++++++++%3Cdiv+class%3D%22form%22%3E%0A++++++++++++++++++%3Ch3%3EYou+are+registered+successfully.%3C%2Fh3%3E%3Cbr%2F%3E%0A++++++++++++++++++%3Cp+class%3D%22link%22%3EClick+here+to+%3Ca+href%3D%22login.php%22%3ELogin%3C%2Fa%3E%3C%2Fp%3E%0A++++++++++++++++++%3C%2Fdiv%3E%0A++++++++'
   30    12      > JMP                                                      ->14
   39    13    >   ECHO                                                     '++++++++++++++++++%3Cdiv+class%3D%22form%22%3E%0A++++++++++++++++++%3Ch3%3ERequired+fields+are+missing.%3C%2Fh3%3E%3Cbr%2F%3E%0A++++++++++++++++++%3Cp+class%3D%22link%22%3EClick+here+to+%3Ca+href%3D%22registration.php%22%3Eregistration%3C%2Fa%3E+again.%3C%2Fp%3E%0A++++++++++++++++++%3C%2Fdiv%3E%0A++++++++%0A+++++++'
   15    14    > > JMP                                                      ->16
   48    15    >   ECHO                                                     '++++%3Cform+class%3D%22form%22+action%3D%22%22+method%3D%22post%22%3E%0A++++++++%3Ch1+class%3D%22login-title%22%3ERegistration%3C%2Fh1%3E%0A++++++++%3Cinput+type%3D%22text%22+class%3D%22login-input%22+name%3D%22username%22+placeholder%3D%22Username%22+required+%2F%3E%0A++++++++%3Cinput+type%3D%22text%22+class%3D%22login-input%22+name%3D%22email%22+placeholder%3D%22Email+Adress%22%3E%0A++++++++%3Cinput+type%3D%22password%22+class%3D%22login-input%22+name%3D%22password%22+placeholder%3D%22Password%22%3E%0A++++++++%3Cinput+type%3D%22submit%22+name%3D%22check%22+value%3D%22Register%22+class%3D%22login-button%22%3E%0A++++++++%3Cp+class%3D%22link%22%3EAlready+have+an+account%3F+%3Ca+href%3D%22login.php%22%3ELogin+here%3C%2Fa%3E%3C%2Fp%3E%0A++++%3C%2Fform%3E%0A'
    2    16    > > JMP                                                      ->18
   59    17    >   ECHO                                                     'Session+not+work'
   62    18    >   ECHO                                                     '%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   63    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.21 ms | 1441 KiB | 14 Q