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=new mysqli('localhost','root','password') 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.0090.00916.75
8.3.50.0130.01221.28
8.3.40.0070.00718.79
8.3.30.0110.00418.79
8.3.20.0080.00020.30
8.3.10.0070.00023.61
8.3.00.0000.00823.53
8.2.180.0110.00416.32
8.2.170.0180.00022.96
8.2.160.0100.00720.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00821.03
8.2.120.0000.00726.35
8.2.110.0060.00319.21
8.2.100.0040.00717.90
8.2.90.0030.00519.13
8.2.80.0030.00617.97
8.2.70.0060.00317.50
8.2.60.0060.00617.79
8.2.50.0030.00618.09
8.2.40.0030.00522.32
8.2.30.0070.00019.28
8.2.20.0000.00717.69
8.2.10.0000.00818.05
8.2.00.0020.00517.93
8.1.280.0040.01425.92
8.1.270.0120.00922.19
8.1.260.0000.00828.09
8.1.250.0040.00428.09
8.1.240.0040.00422.04
8.1.230.0040.00717.71
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0040.00417.10
8.1.190.0080.00017.23
8.1.180.0000.00818.10
8.1.170.0000.00818.45
8.1.160.0050.00220.73
8.1.150.0000.00718.89
8.1.140.0050.00319.36
8.1.130.0000.00717.53
8.1.120.0120.00017.39
8.1.110.0000.00717.32
8.1.100.0000.00817.37
8.1.90.0000.00817.36
8.1.80.0040.00417.29
8.1.70.0030.00317.27
8.1.60.0080.00017.48
8.1.50.0000.00917.49
8.1.40.0020.00517.56
8.1.30.0060.00317.53
8.1.20.0000.00817.55
8.1.10.0000.00717.57
8.1.00.0050.00317.36
8.0.300.0000.00718.78
8.0.290.0000.00716.63
8.0.280.0000.00718.45
8.0.270.0000.00717.18
8.0.260.0000.00617.17
8.0.250.0030.00316.97
8.0.240.0060.00316.98
8.0.230.0030.00316.98
8.0.220.0070.00016.91
8.0.210.0040.00416.94
8.0.200.0030.00316.98
8.0.190.0000.00816.95
8.0.180.0040.00416.83
8.0.170.0030.00517.00
8.0.160.0000.00716.91
8.0.150.0050.00316.93
8.0.140.0040.00416.88
8.0.130.0000.00613.30
8.0.120.0080.00016.94
8.0.110.0040.00416.91
8.0.100.0050.00316.78
8.0.90.0040.00416.80
8.0.80.0110.00416.88
8.0.70.0000.00817.03
8.0.60.0050.00316.89
8.0.50.0070.00016.93
8.0.30.0120.00917.05
8.0.20.0110.00717.40
8.0.10.0040.00416.86
8.0.00.0060.01416.74
7.4.330.0000.00516.78
7.4.320.0030.00316.45
7.4.300.0000.00816.54
7.4.290.0030.00616.48
7.4.280.0000.00716.43
7.4.270.0000.00716.52
7.4.260.0030.00316.51
7.4.250.0030.00516.30
7.4.240.0070.00016.55
7.4.230.0030.00316.30
7.4.220.0120.00616.43
7.4.210.0110.00716.66
7.4.200.0070.00016.63
7.4.160.0090.01216.47
7.4.150.0060.01217.40
7.4.140.0120.00717.86
7.4.130.0130.00516.61
7.4.120.0080.01216.44
7.4.110.0090.00616.41
7.4.100.0150.00316.44
7.4.90.0070.01116.33
7.4.80.0110.01119.39
7.4.70.0040.01216.45
7.4.60.0100.00716.59
7.4.50.0000.01716.32
7.4.40.0130.00316.64
7.4.30.0190.00316.60
7.4.00.0000.01115.01
7.3.330.0050.00313.19
7.3.320.0000.00513.28
7.3.310.0000.00716.23
7.3.300.0000.00716.29
7.3.290.0080.01016.36
7.3.280.0120.00416.33
7.3.270.0060.01217.40
7.3.260.0170.00016.37
7.3.250.0090.01016.35
7.3.240.0060.01616.30
7.3.230.0110.00616.57
7.3.210.0170.00316.54
7.3.200.0160.00019.39
7.3.190.0060.00916.52
7.3.180.0070.01016.52
7.3.170.0160.01116.30
7.3.160.0080.01116.31
7.3.10.0000.01416.44
7.3.00.0000.01616.27
7.2.330.0030.01516.57
7.2.320.0160.00016.37
7.2.310.0070.01416.62
7.2.300.0070.01116.64
7.2.290.0030.01316.56
7.2.130.0060.00916.77
7.2.120.0100.00716.72
7.2.110.0030.00616.75
7.2.100.0070.00316.41
7.2.90.0060.00616.53
7.2.80.0080.00416.80
7.2.70.0070.00716.73
7.2.60.0070.00716.80
7.2.50.0060.00916.52
7.2.40.0070.00716.84
7.2.30.0100.00316.81
7.2.20.0000.01316.50
7.2.10.0040.00716.84
7.2.00.0070.00617.73
7.1.250.0080.00015.32
7.1.200.0030.01015.56
7.1.100.0070.00718.00
7.1.70.0040.00417.17
7.1.60.0100.01419.40
7.1.50.0060.01516.90
7.1.00.0030.07722.57
7.0.200.0760.00315.00
7.0.60.0230.04021.82
7.0.50.0130.07717.92
7.0.40.0100.08320.40
7.0.30.0330.06720.19
7.0.20.0200.07020.21
7.0.10.0100.07020.16
7.0.00.0000.04320.23
5.6.280.0070.03021.16
5.6.210.0100.08020.72
5.6.200.0100.04718.19
5.6.190.0100.04020.77
5.6.180.0100.04720.61
5.6.170.0270.04020.58
5.6.160.0030.09020.50
5.6.150.0070.08018.15
5.6.140.0130.07318.15
5.6.130.0170.07018.21
5.6.120.0130.07720.98
5.6.110.0330.05021.00
5.6.100.0070.06721.04
5.6.90.0100.08721.02
5.6.80.0200.06720.55
5.5.350.0000.08720.50
5.5.340.0070.08317.98
5.5.330.0100.08020.35
5.5.320.0530.05020.35
5.5.310.0300.06020.32
5.5.300.0100.05317.94
5.5.290.0070.08717.98
5.5.280.0070.08720.97
5.5.270.0100.07720.80
5.5.260.0100.08320.78
5.5.250.0000.04320.63
5.5.240.0200.07320.27

preferences:
41.81 ms | 401 KiB | 5 Q