3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('DB_HOST','localhost'); define('DB_NAME','client_registration'); define('DB_USER','root'); define('DB_PASSWORD','lunaone'); $con=mysqli_connect('localhost','root','lunaone') or die("Failed to connect to MySQL: " . mysqli_error()); $db=mysqli_select_db('client_registration',$con) or die("Failed to connect to MySQL: " . mysqli_error()); function NewUser() { $firstName = $_POST['first_name']; $lastName = $_POST['last_name']; $companyName = $_POST['company_name']; $phoneNumber = $_POST['phone_number']; $email = $_POST['email_address']; $password = $_POST['password']; $query = "INSERT INTO WebsiteUsers (firstName,lastName,companyName,phoneNumber,email_address,password) VALUES ('$irstName','$lastName''$companyName','$phoneNumber','$email_address','$password')"; $data = mysqli_query ($query)or die(mysqli_error()); if($data) { echo "YOUR REGISTRATION IS COMPLETED..."; } } function SignUp() { if(!empty($_POST['user'])) //checking the 'user' name which is from Sign-Up.html, is it empty or have some text { $query = mysqli_query("SELECT * FROM WebsiteUsers WHERE email_address = '$_POST[email_address]' AND password = '$_POST[password]'") or die(mysqli_error()); if(!$row = mysqli_fetch_array($query) or die(mysqli_error())) { newuser(); } else { echo "SORRY...YOU ARE ALREADY REGISTERED USER..."; } } } if(isset($_POST['submit'])) { SignUp(); } ?>

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.3.60.0070.00718.39
8.3.50.0040.01116.25
8.3.40.0070.00718.86
8.3.30.0090.00618.71
8.3.20.0040.00420.16
8.3.10.0040.00423.65
8.3.00.0060.00321.87
8.2.180.0160.00618.41
8.2.170.0140.00022.96
8.2.160.0070.00720.47
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00421.18
8.2.120.0050.00226.35
8.2.110.0030.00720.98
8.2.100.0090.00317.80
8.2.90.0040.00419.27
8.2.80.0040.00417.97
8.2.70.0000.00917.63
8.2.60.0030.00617.92
8.2.50.0000.00818.09
8.2.40.0000.00822.08
8.2.30.0070.00019.32
8.2.20.0040.00417.73
8.2.10.0090.00018.01
8.2.00.0000.00718.10
8.1.280.0110.00625.92
8.1.270.0110.00322.01
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0100.00022.09
8.1.230.0080.00317.76
8.1.220.0000.00917.74
8.1.210.0000.00818.77
8.1.200.0030.00717.23
8.1.190.0030.00517.23
8.1.180.0040.00418.10
8.1.170.0030.00618.38
8.1.160.0050.00320.73
8.1.150.0040.00420.73
8.1.140.0030.00619.35
8.1.130.0040.00417.52
8.1.120.0090.00317.33
8.1.110.0000.00817.34
8.1.100.0000.00717.36
8.1.90.0080.00017.35
8.1.80.0050.00217.42
8.1.70.0000.00717.28
8.1.60.0030.00517.49
8.1.50.0000.00817.44
8.1.40.0040.00417.45
8.1.30.0050.00317.49
8.1.20.0050.00317.66
8.1.10.0040.00417.54
8.1.00.0060.00317.36
8.0.300.0000.00818.77
8.0.290.0040.00416.63
8.0.280.0000.00718.42
8.0.270.0030.00317.15
8.0.260.0040.00417.20
8.0.250.0050.00316.96
8.0.240.0030.00616.88
8.0.230.0000.00716.98
8.0.220.0040.00416.86
8.0.210.0070.00016.82
8.0.200.0030.00316.89
8.0.190.0000.00916.93
8.0.180.0000.00716.98
8.0.170.0040.00416.92
8.0.160.0030.00316.91
8.0.150.0070.00016.90
8.0.140.0040.00416.77
8.0.130.0030.00313.27
8.0.120.0040.00416.89
8.0.110.0050.00316.82
8.0.100.0040.00416.88
8.0.90.0000.00716.98
8.0.80.0030.01716.87
8.0.70.0000.00716.96
8.0.60.0040.00416.73
8.0.50.0030.00516.86
8.0.30.0100.00716.97
8.0.20.0130.00617.40
8.0.10.0030.00516.78
8.0.00.0080.00916.67
7.4.330.0000.00516.83
7.4.320.0000.00616.53
7.4.300.0000.00716.57
7.4.290.0060.00316.55
7.4.280.0040.00416.60
7.4.270.0000.00716.44
7.4.260.0030.00716.50
7.4.250.0050.00216.52
7.4.240.0070.00016.52
7.4.230.0040.00416.36
7.4.220.0160.01016.58
7.4.210.0030.01116.57
7.4.200.0070.00016.67
7.4.160.0160.00016.43
7.4.150.0150.00317.40
7.4.140.0100.01017.86
7.4.130.0140.00316.50
7.4.120.0100.00816.57
7.4.110.0090.00916.45
7.4.100.0110.00716.39
7.4.90.0070.01016.61
7.4.80.0120.00919.39
7.4.70.0060.01016.55
7.4.60.0100.00716.35
7.4.50.0100.00616.17
7.4.40.0100.00716.49
7.4.30.0070.01416.22
7.4.00.0070.01114.83
7.3.330.0000.00513.34
7.3.320.0000.00513.33
7.3.310.0000.00716.23
7.3.300.0070.00016.32
7.3.290.0060.01216.31
7.3.280.0080.01116.27
7.3.270.0100.00717.40
7.3.260.0180.00616.51
7.3.250.0100.00816.38
7.3.240.0110.00616.42
7.3.230.0120.00616.49
7.3.210.0130.00616.49
7.3.200.0130.00719.39
7.3.190.0080.00816.52
7.3.180.0090.00916.34
7.3.170.0150.00616.39
7.3.160.0030.01316.31
7.2.330.0100.00716.33
7.2.320.0090.00616.45
7.2.310.0090.00916.62
7.2.300.0060.01116.56
7.2.290.0070.01016.29
7.2.60.0040.00816.68
7.2.00.0080.00819.46
7.1.200.0070.00415.88
7.1.100.0100.00017.95
7.1.70.0000.00817.18
7.1.60.0160.00919.40
7.1.50.0030.01716.73
7.1.00.0030.07322.43
7.0.200.0030.00316.71
7.0.100.0070.08019.93
7.0.90.0070.08319.98
7.0.80.0130.07019.83
7.0.70.0100.07719.86
7.0.60.0070.08719.83
7.0.50.0030.08720.39
7.0.40.0070.08020.08
7.0.30.0070.08320.03
7.0.20.0000.05019.96
7.0.10.0130.05720.13
7.0.00.0070.08320.06
5.6.280.0100.06021.06
5.6.250.0100.08020.59
5.6.240.0170.07320.56
5.6.230.0100.07020.59
5.6.220.0100.08020.44
5.6.210.0070.08020.60
5.6.200.0030.08720.98
5.6.190.0100.07721.14
5.6.180.0070.08320.98
5.6.170.0100.08321.07
5.6.160.0100.03720.99
5.6.150.0030.05721.04
5.6.140.0070.04021.05
5.6.130.0130.03720.89
5.6.120.0100.05020.91
5.6.110.0030.05320.98
5.6.100.0100.03721.04
5.6.90.0070.04720.93
5.6.80.0030.04020.36
5.6.70.0000.04720.43
5.6.60.0030.05020.36
5.6.50.0070.04020.42
5.6.40.0070.04720.30
5.6.30.0100.04020.43
5.6.20.0100.06320.26
5.6.10.0030.04020.34
5.6.00.0070.04720.39
5.5.380.0100.08020.39
5.5.370.0070.07720.43
5.5.360.0030.08020.50
5.5.350.0030.08720.29
5.5.340.0130.07320.77
5.5.330.0170.07320.82
5.5.320.0170.07320.80
5.5.310.0130.07320.79
5.5.300.0070.04020.84
5.5.290.0030.04320.85
5.5.280.0030.04320.77
5.5.270.0070.04020.69
5.5.260.0070.04020.74
5.5.250.0030.04020.53
5.5.240.0070.03719.99
5.5.230.0000.04320.17
5.5.220.0070.05320.27
5.5.210.0030.04020.21
5.5.200.0100.04720.25
5.5.190.0130.08320.19
5.5.180.0030.07720.18
5.5.160.0070.04720.08
5.5.150.0070.04019.91
5.5.140.0070.06320.04
5.5.130.0030.04719.94
5.5.120.0030.05720.09
5.5.110.0070.03720.10
5.5.100.0070.07020.12
5.5.90.0030.04020.07
5.5.80.0070.04019.97
5.5.70.0030.04020.12
5.5.60.0070.03720.05
5.5.50.0100.03720.05
5.5.40.0100.03720.07
5.5.30.0030.07320.12
5.5.20.0070.06720.02
5.5.10.0030.04019.99
5.5.00.0200.05319.94

preferences:
61.55 ms | 401 KiB | 5 Q