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>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.4.10.0160.00319.61
8.3.140.0160.00316.54
8.3.130.0050.00218.54
8.3.120.0130.00718.87
8.3.110.0120.00420.94
8.3.100.0080.00818.38
8.3.90.0060.00326.77
8.3.80.0040.00419.36
8.3.70.0140.00718.30
8.3.60.0110.01118.30
8.3.50.0100.00824.43
8.3.40.0140.00718.71
8.3.30.0140.00018.67
8.3.20.0030.00624.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.260.0030.01617.29
8.2.250.0090.00616.81
8.2.240.0140.00016.98
8.2.230.0060.00322.58
8.2.220.0040.00424.06
8.2.210.0040.00426.77
8.2.200.0060.00318.88
8.2.190.0140.00316.75
8.2.180.0110.00425.92
8.2.170.0000.01518.91
8.2.160.0080.00822.96
8.2.150.0080.00025.66
8.2.140.0000.01124.66
8.2.130.0040.00426.16
8.2.120.0050.00320.02
8.2.110.0000.00921.03
8.2.100.0090.00318.03
8.2.90.0000.00818.28
8.2.80.0030.00520.48
8.2.70.0090.00317.63
8.2.60.0050.00318.16
8.2.50.0040.00418.07
8.2.40.0040.00418.22
8.2.30.0050.00218.19
8.2.20.0040.00418.19
8.2.10.0040.00419.30
8.2.00.0040.00419.32
8.1.310.0090.00016.59
8.1.300.0160.00317.79
8.1.290.0070.00730.84
8.1.280.0110.00725.92
8.1.270.0060.00323.80
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0030.00622.19
8.1.230.0040.00820.89
8.1.220.0040.00417.74
8.1.210.0000.00818.88
8.1.200.0080.00517.23
8.1.190.0040.00417.25
8.1.180.0000.00818.10
8.1.170.0030.00518.59
8.1.160.0040.00418.88
8.1.150.0000.00718.79
8.1.140.0040.00418.84
8.1.130.0000.00720.07
8.1.120.0030.00617.46
8.1.110.0040.00417.35
8.1.100.0050.00317.38
8.1.90.0050.00317.50
8.1.80.0000.00817.46
8.1.70.0000.00717.45
8.1.60.0000.00817.50
8.1.50.0050.00317.54
8.1.40.0030.00717.50
8.1.30.0080.00017.68
8.1.20.0040.00417.55
8.1.10.0030.00517.52
8.1.00.0040.00417.48
8.0.300.0030.00320.21
8.0.290.0040.00416.75
8.0.280.0070.00018.52
8.0.270.0040.00417.95
8.0.260.0060.00018.70
8.0.250.0040.00416.94
8.0.240.0000.00716.96
8.0.230.0000.00716.95
8.0.220.0070.00016.89
8.0.210.0030.00316.84
8.0.200.0030.00316.85
8.0.190.0000.00816.98
8.0.180.0040.00416.91
8.0.170.0050.00316.83
8.0.160.0000.00816.88
8.0.150.0000.00816.73
8.0.140.0000.00716.86
8.0.130.0000.00513.29
8.0.120.0040.00416.86
8.0.110.0000.00816.94
8.0.100.0030.00516.76
8.0.90.0000.00816.95
8.0.80.0060.01016.89
8.0.70.0070.00016.76
8.0.60.0040.00416.93
8.0.50.0050.00216.96
8.0.30.0140.00717.13
8.0.20.0000.02017.29
8.0.10.0030.01417.15
8.0.00.0130.00616.96
7.4.330.0020.00215.55
7.4.320.0040.00416.52
7.4.300.0000.00616.52
7.4.290.0040.00416.54
7.4.280.0040.00416.60
7.4.270.0080.00016.47
7.4.260.0030.00313.22
7.4.250.0060.00316.49
7.4.240.0030.00516.49
7.4.230.0000.00716.42
7.4.220.0030.00516.66
7.4.210.0100.00716.57
7.4.200.0030.00316.62
7.4.150.0170.00716.45
7.4.140.0150.00416.48
7.4.130.0100.00716.70
7.4.120.0110.00616.29
7.4.110.0070.01116.46
7.4.100.0130.00716.40
7.4.90.0130.00816.47
7.4.80.0120.00416.40
7.4.70.0090.00916.41
7.4.60.0140.00716.63
7.4.50.0090.00916.66
7.4.40.0220.00316.67
7.4.30.0090.00916.59
7.4.20.0160.00316.61
7.4.10.0150.00316.54
7.4.00.0060.01416.26
7.3.330.0060.00316.26
7.3.320.0030.00312.95
7.3.310.0030.00316.31
7.3.300.0030.00316.05
7.3.290.0100.00816.26
7.3.270.0100.01016.30
7.3.260.0060.01216.41
7.3.250.0180.00016.23
7.3.240.0120.00716.46
7.3.230.0140.00316.30
7.3.220.0080.00816.25
7.3.210.0100.00716.36
7.3.200.0120.00816.18
7.3.190.0110.00616.51
7.3.180.0120.00916.21
7.3.170.0030.01416.20
7.3.160.0110.01516.24
7.3.150.0130.00416.32
7.3.140.0160.00016.28
7.3.130.0050.01116.36
7.3.120.0120.00816.16
7.3.110.0000.01616.37
7.3.100.0070.01116.30
7.3.90.0120.00516.13
7.3.80.0100.01016.24
7.3.70.0110.00816.35
7.3.60.0100.00716.36
7.3.50.0090.00916.34
7.3.40.0090.00916.29
7.3.30.0120.00316.22
7.3.20.0120.00616.29
7.3.10.0180.00016.45
7.3.00.0130.00416.30

preferences:
78.25 ms | 403 KiB | 5 Q