3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('DB_HOST', 'localhost'); define('DB_NAME', 'client_registration'); define('DB_USER','lunaone'); define('DB_PASSWORD','lunaone'); $con=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD) or die("Failed to connect to MySQL: " . mysql_error()); $db=mysql_select_db(DB_NAME,$con) or die("Failed to connect to MySQL: " . mysql_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 = mysql_query ($query)or die(mysql_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 = mysql_query("SELECT * FROM WebsiteUsers WHERE email_address = '$_POST[email_address]' AND password = '$_POST[password]'") or die(mysql_error()); if(!$row = mysql_fetch_array($query) or die(mysql_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.0110.00416.50
8.3.50.0090.00616.26
8.3.40.0120.00318.84
8.3.30.0110.00418.59
8.3.20.0050.00320.38
8.3.10.0040.00421.63
8.3.00.0040.00423.65
8.2.180.0110.00316.88
8.2.170.0040.01122.96
8.2.160.0030.01020.35
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0030.00620.90
8.2.120.0000.00726.35
8.2.110.0060.00320.53
8.2.100.0090.00317.91
8.2.90.0040.00417.63
8.2.80.0040.00418.79
8.2.70.0050.00317.63
8.2.60.0000.00817.49
8.2.50.0000.00918.09
8.2.40.0060.00322.36
8.2.30.0000.00819.30
8.2.20.0000.00817.72
8.2.10.0040.00418.08
8.2.00.0030.00517.85
8.1.280.0110.00425.92
8.1.270.0120.00322.01
8.1.260.0080.00028.09
8.1.250.0070.00028.09
8.1.240.0090.00018.84
8.1.230.0070.00322.13
8.1.220.0000.00817.74
8.1.210.0030.00718.77
8.1.200.0040.00417.25
8.1.190.0040.00817.13
8.1.180.0000.00818.10
8.1.170.0030.00518.52
8.1.160.0070.00020.74
8.1.150.0070.00018.92
8.1.140.0000.00819.53
8.1.130.0000.00717.52
8.1.120.0050.00317.38
8.1.110.0000.00717.36
8.1.100.0040.00417.43
8.1.90.0000.00717.31
8.1.80.0070.00017.24
8.1.70.0080.00017.38
8.1.60.0040.00417.58
8.1.50.0000.00917.49
8.1.40.0040.00417.46
8.1.30.0080.00017.46
8.1.20.0000.00717.56
8.1.10.0000.00717.54
8.1.00.0000.00917.50
8.0.300.0000.00818.77
8.0.290.0060.00316.75
8.0.280.0030.00318.42
8.0.270.0040.00417.29
8.0.260.0040.00417.23
8.0.250.0000.00716.88
8.0.240.0030.00617.03
8.0.230.0000.00716.96
8.0.220.0030.00316.91
8.0.210.0040.00417.00
8.0.200.0000.00617.05
8.0.190.0080.00016.95
8.0.180.0000.00716.99
8.0.170.0040.00416.91
8.0.160.0030.00316.83
8.0.150.0050.00216.83
8.0.140.0070.00416.91
8.0.130.0050.00213.35
8.0.120.0000.00816.75
8.0.110.0000.00816.89
8.0.100.0070.00016.91
8.0.90.0070.00016.94
8.0.80.0030.01216.91
8.0.70.0040.00416.79
8.0.60.0050.00316.79
8.0.50.0000.00816.71
8.0.30.0120.00716.96
8.0.20.0090.01017.40
8.0.10.0000.00716.86
8.0.00.0080.00916.72
7.4.330.0020.00216.79
7.4.320.0030.00316.34
7.4.300.0060.00016.43
7.4.290.0060.00316.55
7.4.280.0040.00416.39
7.4.270.0030.00316.55
7.4.260.0000.00816.60
7.4.250.0070.00016.55
7.4.240.0040.00416.40
7.4.230.0070.00016.58
7.4.220.0060.01216.42
7.4.210.0030.01416.56
7.4.200.0040.00416.64
7.4.160.0030.01216.40
7.4.150.0080.01117.40
7.4.140.0120.00917.86
7.4.130.0110.01016.58
7.4.120.0090.00716.57
7.4.110.0160.00816.34
7.4.100.0150.00616.34
7.4.90.0150.00316.63
7.4.80.0130.01019.39
7.4.70.0110.00516.70
7.4.60.0080.00816.59
7.4.50.0030.00916.30
7.4.40.0120.00316.67
7.4.30.0130.01016.41
7.4.00.0030.01015.18
7.3.330.0060.00013.29
7.3.320.0050.00013.18
7.3.310.0000.00716.32
7.3.300.0030.00316.34
7.3.290.0000.00716.34
7.3.280.0090.00816.35
7.3.270.0070.01017.40
7.3.260.0040.01416.27
7.3.250.0110.00616.58
7.3.240.0020.01616.50
7.3.230.0070.01016.48
7.3.210.0100.00716.43
7.3.200.0120.00319.39
7.3.190.0090.00916.29
7.3.180.0100.00716.52
7.3.170.0150.00316.70
7.3.160.0120.00816.37
7.2.330.0120.00916.39
7.2.320.0130.01016.57
7.2.310.0100.01416.61
7.2.300.0150.00416.69
7.2.290.0100.00916.63
7.2.60.0030.01016.88
7.2.00.0000.01219.39
7.1.200.0080.00015.81
7.1.100.0040.00817.94
7.1.70.0000.00717.08
7.1.60.0100.01319.40
7.1.50.0100.01016.88
7.1.00.0100.07022.40
7.0.200.0180.00416.33
7.0.60.0330.06719.89
7.0.50.0000.04317.88
7.0.40.0070.08720.13
7.0.30.0230.05320.21
7.0.20.0400.08020.21
7.0.10.0070.08720.09
7.0.00.0070.08720.23
5.6.210.0100.06320.52
5.6.200.0070.07718.19
5.6.190.0100.05720.49
5.6.180.0230.06320.50
5.6.170.0370.07720.57
5.6.160.0170.07720.47
5.6.150.0070.06018.27
5.6.140.0070.08018.17
5.6.130.0100.08018.24
5.6.120.0100.07721.13
5.6.110.0100.08020.98
5.6.100.0230.06721.13
5.6.90.0070.05720.99
5.6.80.0130.04320.37
5.5.350.0230.08320.29
5.5.340.0000.04318.07
5.5.330.0070.04020.57
5.5.320.0530.05320.36
5.5.310.0130.04320.34
5.5.300.0100.05018.01
5.5.290.0070.08718.08
5.5.280.0100.08320.74
5.5.270.0070.06320.89
5.5.260.0130.08020.88
5.5.250.0070.09320.71
5.5.240.0070.04320.15

preferences:
61.3 ms | 401 KiB | 5 Q