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','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.0060.01216.38
8.3.50.0170.00315.99
8.3.40.0110.00718.97
8.3.30.0040.01118.60
8.3.20.0040.00420.16
8.3.10.0070.00023.34
8.3.00.0060.00323.67
8.2.180.0160.00016.63
8.2.170.0090.00922.96
8.2.160.0100.00720.36
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0080.00021.09
8.2.120.0050.00326.35
8.2.110.0000.01121.17
8.2.100.0040.00817.78
8.2.90.0030.00517.90
8.2.80.0030.00618.03
8.2.70.0030.00617.50
8.2.60.0100.00017.80
8.2.50.0050.00518.09
8.2.40.0040.00422.14
8.2.30.0070.00019.28
8.2.20.0000.00817.76
8.2.10.0040.00418.13
8.2.00.0030.00518.02
8.1.280.0110.00625.92
8.1.270.0110.00722.05
8.1.260.0040.00428.09
8.1.250.0060.00328.09
8.1.240.0030.00722.42
8.1.230.0040.00720.89
8.1.220.0030.00517.74
8.1.210.0030.00518.89
8.1.200.0030.00617.13
8.1.190.0080.00017.23
8.1.180.0000.00718.10
8.1.170.0060.00318.46
8.1.160.0000.00720.65
8.1.150.0030.00618.96
8.1.140.0030.00519.49
8.1.130.0000.00717.48
8.1.120.0090.00317.30
8.1.110.0040.00417.31
8.1.100.0060.00317.25
8.1.90.0040.00417.25
8.1.80.0080.00017.39
8.1.70.0050.00217.36
8.1.60.0040.00417.45
8.1.50.0030.00617.41
8.1.40.0080.00017.54
8.1.30.0030.00517.62
8.1.20.0000.00817.57
8.1.10.0070.00017.43
8.1.00.0060.00317.38
8.0.300.0040.00419.86
8.0.290.0000.00816.75
8.0.280.0000.00718.42
8.0.270.0000.00717.21
8.0.260.0030.00317.27
8.0.250.0030.00316.88
8.0.240.0000.01016.97
8.0.230.0070.00016.91
8.0.220.0030.00316.84
8.0.210.0080.00016.92
8.0.200.0000.00617.02
8.0.190.0030.00516.88
8.0.180.0080.00016.94
8.0.170.0050.00316.95
8.0.160.0030.00316.91
8.0.150.0030.00316.75
8.0.140.0050.00216.76
8.0.130.0060.00013.40
8.0.120.0040.00416.78
8.0.110.0050.00316.95
8.0.100.0050.00216.82
8.0.90.0080.00016.89
8.0.80.0120.00316.91
8.0.70.0070.00016.98
8.0.60.0000.00716.98
8.0.50.0020.00516.98
8.0.30.0060.01117.13
8.0.20.0100.00817.40
8.0.10.0000.00817.04
8.0.00.0140.00316.61
7.4.330.0000.00516.67
7.4.320.0030.00316.42
7.4.300.0060.00016.51
7.4.290.0030.00716.54
7.4.280.0080.00016.45
7.4.270.0030.00316.58
7.4.260.0090.00016.44
7.4.250.0000.00816.38
7.4.240.0070.00016.42
7.4.230.0000.00716.37
7.4.220.0070.01116.59
7.4.210.0150.00416.66
7.4.200.0000.00716.37
7.4.160.0060.00916.31
7.4.150.0120.00617.40
7.4.140.0120.00817.86
7.4.130.0140.00516.53
7.4.120.0070.01416.55
7.4.110.0070.01016.58
7.4.100.0100.01316.27
7.4.90.0120.00616.43
7.4.80.0090.00919.39
7.4.70.0160.00016.42
7.4.60.0130.00416.62
7.4.50.0040.01116.41
7.4.40.0080.00816.52
7.4.30.0100.00616.53
7.4.00.0050.01015.08
7.3.330.0030.00513.30
7.3.320.0030.00313.35
7.3.310.0030.00316.37
7.3.300.0000.00716.34
7.3.290.0060.01016.30
7.3.280.0070.01016.29
7.3.270.0100.00717.40
7.3.260.0090.00916.43
7.3.250.0070.01216.48
7.3.240.0110.01016.43
7.3.230.0070.01016.48
7.3.210.0130.01016.26
7.3.200.0000.01719.39
7.3.190.0060.01016.30
7.3.180.0070.01416.47
7.3.170.0100.01016.55
7.3.160.0210.00316.31
7.2.330.0070.01016.32
7.2.320.0130.00316.49
7.2.310.0030.01316.69
7.2.300.0060.01116.68
7.2.290.0060.01016.63
7.2.60.0040.01116.91
7.2.00.0040.00719.02
7.1.200.0040.00815.75
7.1.100.0070.00718.05
7.1.70.0030.00716.77
7.1.60.0090.01619.40
7.1.50.0030.01616.95
7.1.00.0070.07322.54
7.0.200.0970.00614.77
7.0.60.0130.03021.82
7.0.50.0100.07018.01
7.0.40.0030.04320.24
7.0.30.0270.07320.31
7.0.20.0500.06020.04
7.0.10.0030.07320.30
7.0.00.0070.04020.23
5.6.280.0100.04021.11
5.6.210.0130.05720.62
5.6.200.0030.08318.16
5.6.190.0000.06320.48
5.6.180.0100.04720.34
5.6.170.0270.07020.48
5.6.160.0070.05020.71
5.6.150.0070.08018.18
5.6.140.0030.08718.18
5.6.130.0170.07718.13
5.6.120.0070.08020.90
5.6.110.0070.06721.00
5.6.100.0000.04321.13
5.6.90.0000.09320.99
5.6.80.0070.06720.41
5.5.350.0100.07320.46
5.5.340.0030.04017.96
5.5.330.0100.06720.37
5.5.320.0270.04020.30
5.5.310.0330.07020.30
5.5.300.0000.08717.98
5.5.290.0130.07317.94
5.5.280.0200.03320.77
5.5.270.0000.04720.88
5.5.260.0070.09020.88
5.5.250.0030.04020.68
5.5.240.0170.03320.29

preferences:
59.35 ms | 400 KiB | 5 Q