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=mysqli_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.0040.01116.50
8.3.50.0080.00616.20
8.3.40.0090.00618.80
8.3.30.0070.00718.98
8.3.20.0040.00420.37
8.3.10.0080.00021.63
8.3.00.0070.00021.85
8.2.180.0070.01016.88
8.2.170.0110.00422.96
8.2.160.0100.00320.39
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0050.00321.04
8.2.120.0050.00326.35
8.2.110.0070.00421.07
8.2.100.0060.00617.80
8.2.90.0040.00419.05
8.2.80.0040.00417.97
8.2.70.0060.00317.38
8.2.60.0040.00417.90
8.2.50.0000.00818.09
8.2.40.0050.00320.64
8.2.30.0000.00719.47
8.2.20.0040.00417.66
8.2.10.0040.00417.96
8.2.00.0040.00418.03
8.1.280.0110.00425.92
8.1.270.0170.00322.19
8.1.260.0070.00028.09
8.1.250.0070.00028.09
8.1.240.0060.00323.96
8.1.230.0040.00717.64
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0070.00317.23
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0000.00818.53
8.1.160.0040.00420.55
8.1.150.0080.00018.95
8.1.140.0000.00819.40
8.1.130.0070.00017.49
8.1.120.0000.00717.29
8.1.110.0040.00417.26
8.1.100.0040.00417.34
8.1.90.0050.00317.36
8.1.80.0040.00417.23
8.1.70.0030.00317.36
8.1.60.0040.00417.48
8.1.50.0000.00817.51
8.1.40.0030.00517.38
8.1.30.0040.00417.59
8.1.20.0040.00417.45
8.1.10.0000.00717.52
8.1.00.0040.00417.51
8.0.300.0090.00018.77
8.0.290.0080.00016.63
8.0.280.0030.00318.53
8.0.270.0000.00817.15
8.0.260.0080.00017.16
8.0.250.0030.00317.04
8.0.240.0040.00717.00
8.0.230.0030.00317.00
8.0.220.0070.00016.85
8.0.210.0050.00316.82
8.0.200.0000.00616.95
8.0.190.0030.00616.97
8.0.180.0040.00416.85
8.0.170.0070.00016.95
8.0.160.0040.00416.85
8.0.150.0030.00316.83
8.0.140.0030.00616.90
8.0.130.0030.00313.30
8.0.120.0080.00016.85
8.0.110.0040.00416.89
8.0.100.0050.00316.90
8.0.90.0000.00716.84
8.0.80.0110.00316.95
8.0.70.0030.00517.04
8.0.60.0080.00016.80
8.0.50.0040.00416.79
8.0.30.0160.00216.91
8.0.20.0110.00717.40
8.0.10.0070.00017.03
8.0.00.0100.00816.80
7.4.330.0020.00216.79
7.4.320.0030.00316.52
7.4.300.0030.00316.47
7.4.290.0060.00516.39
7.4.280.0060.00316.56
7.4.270.0000.00716.58
7.4.260.0000.00816.57
7.4.250.0000.00716.52
7.4.240.0000.00816.59
7.4.230.0070.00016.69
7.4.220.0170.00716.64
7.4.210.0080.00616.55
7.4.200.0000.00716.46
7.4.160.0100.00716.48
7.4.150.0080.01217.40
7.4.140.0150.00717.86
7.4.130.0070.01416.43
7.4.120.0110.00916.59
7.4.110.0100.01016.52
7.4.100.0140.00316.62
7.4.90.0160.00316.57
7.4.80.0030.01419.39
7.4.70.0100.00516.43
7.4.60.0140.00016.66
7.4.50.0030.01416.41
7.4.40.0030.01316.67
7.4.30.0130.00416.38
7.4.00.0030.00715.07
7.3.330.0000.00513.20
7.3.320.0050.00013.31
7.3.310.0030.00316.32
7.3.300.0050.00216.21
7.3.290.0030.00316.30
7.3.280.0070.00916.29
7.3.270.0090.00817.40
7.3.260.0140.00316.34
7.3.250.0140.01716.38
7.3.240.0110.01116.46
7.3.230.0030.01616.39
7.3.210.0150.00916.22
7.3.200.0120.00319.39
7.3.190.0100.00716.25
7.3.180.0090.01216.32
7.3.170.0070.01016.45
7.3.160.0060.00916.65
7.3.10.0070.00716.49
7.3.00.0030.01016.53
7.2.330.0100.00816.71
7.2.320.0170.00716.55
7.2.310.0170.00016.52
7.2.300.0060.01016.68
7.2.290.0190.00316.63
7.2.130.0060.00916.82
7.2.120.0050.00816.58
7.2.110.0060.00616.62
7.2.100.0050.00816.72
7.2.90.0050.00616.74
7.2.80.0110.00616.67
7.2.70.0100.00616.63
7.2.60.0060.00916.81
7.2.50.0050.00816.63
7.2.40.0060.00616.80
7.2.30.0080.00616.65
7.2.20.0030.00916.61
7.2.10.0070.00716.71
7.2.00.0060.00817.54
7.1.250.0030.01015.58
7.1.240.0090.00415.60
7.1.230.0030.01215.17
7.1.220.0080.00815.60
7.1.210.0000.01115.33
7.1.200.0030.00715.68
7.1.190.0080.00415.61
7.1.180.0130.00015.48
7.1.170.0030.00715.74
7.1.160.0000.01215.51
7.1.150.0070.00715.71
7.1.140.0040.00415.63
7.1.130.0000.00915.64
7.1.120.0040.01115.59
7.1.110.0070.00715.53
7.1.100.0060.00616.63
7.1.90.0080.00415.69
7.1.80.0030.01215.68
7.1.70.0050.00516.30
7.1.60.0100.01017.50
7.1.50.0050.01216.12
7.1.40.0030.01015.69
7.1.30.0030.01315.61
7.1.20.0070.01015.37
7.1.10.0070.00715.71
7.1.00.0020.04319.01
7.0.330.0040.00715.24
7.0.320.0000.01215.27
7.0.310.0090.00015.20
7.0.300.0030.00615.29
7.0.290.0120.00015.23
7.0.280.0030.00515.09
7.0.270.0070.01015.14
7.0.260.0030.00914.84
7.0.250.0030.00515.32
7.0.240.0060.00315.34
7.0.230.0030.00615.44
7.0.220.0040.00915.39
7.0.210.0060.00615.34
7.0.200.0090.00316.02
7.0.190.0110.00415.29
7.0.180.0080.00415.30
7.0.170.0050.00515.50
7.0.160.0030.01015.45
7.0.150.0030.01015.07
7.0.140.0080.00615.56
7.0.130.0100.00715.43
7.0.120.0100.00015.44
7.0.110.0100.00315.41
7.0.100.0000.00915.25
7.0.90.0070.00715.41
7.0.80.0070.00715.44
7.0.70.0000.01315.21
7.0.60.0090.04518.40
7.0.50.0020.02716.61
7.0.40.0090.02216.84
7.0.30.0130.02516.80
7.0.20.0230.04016.68
7.0.10.0140.03816.76
7.0.00.0070.03716.70
5.6.380.0000.01513.92
5.6.370.0120.00314.28
5.6.360.0060.00313.90
5.6.350.0080.00413.92
5.6.340.0040.01114.11
5.6.330.0100.00514.29
5.6.320.0030.01014.02
5.6.310.0030.01013.96
5.6.300.0080.00814.39
5.6.290.0080.00814.06
5.6.280.0030.02017.41
5.6.270.0160.00013.87
5.6.260.0000.00914.00
5.6.250.0090.00614.22
5.6.240.0040.01114.01
5.6.230.0030.00914.16
5.6.220.0040.00814.09
5.6.210.0030.04917.53
5.6.200.0070.03716.00
5.6.190.0030.05317.21
5.6.180.0220.02017.31
5.6.170.0200.03617.35
5.6.160.0120.04217.26
5.6.150.0090.02016.02
5.6.140.0080.04216.03
5.6.130.0080.04616.22
5.6.120.0020.03517.63
5.6.110.0050.02517.56
5.6.100.0080.04317.54
5.6.90.0030.02317.65
5.6.80.0100.03817.09
5.6.70.0040.00714.30
5.6.60.0100.00714.10
5.6.50.0070.00714.00
5.6.40.0060.00613.91
5.6.30.0000.00913.80
5.6.20.0040.00413.90
5.6.10.0040.01114.12
5.6.00.0040.00813.81
5.5.380.0000.00811.01
5.5.370.0000.00610.72
5.5.360.0000.01011.04
5.5.350.0040.02415.65
5.5.340.0010.02614.55
5.5.330.0030.02515.79
5.5.320.0350.03815.70
5.5.310.0100.02515.80
5.5.300.0070.02514.55
5.5.290.0050.02814.60
5.5.280.0070.04415.79
5.5.270.0030.04815.87
5.5.260.0130.04015.79
5.5.250.0080.03815.86
5.5.240.0060.02315.63
5.5.230.0000.01110.67
5.5.220.0070.00010.87
5.5.210.0030.00610.90
5.5.200.0050.00511.00
5.5.190.0070.00710.73
5.5.180.0050.00510.91
5.5.170.0060.00610.50
5.5.160.0070.00710.57
5.5.150.0000.01010.66
5.5.140.0000.00911.08
5.5.130.0060.00611.04
5.5.120.0060.00610.71
5.5.110.0030.00710.97
5.5.100.0000.00810.90
5.5.90.0070.00310.84
5.5.80.0040.00810.98
5.5.70.0040.00410.99
5.5.60.0000.01011.00
5.5.50.0040.00410.82
5.5.40.0040.00710.95
5.5.30.0090.00310.73
5.5.20.0030.00310.86
5.5.10.0000.00910.85
5.5.00.0100.00010.65

preferences:
57.21 ms | 401 KiB | 5 Q