3v4l.org

run code in 300+ PHP versions simultaneously
<?php $host_name = "db690172471.db.1and1.com"; $database = "db690172471"; $user_name = "dbo690172471"; $password = "JrJsmpXH5SM24Z4R"; $connect = mysqli_connect($host_name, $user_name, $password, $database); if ($connect) { // Stuff to do when connected to DB // Retrieves the username value from post $username=$_POST["email"]; $pwh=$_POST["pwh"]; // Checks to see if the username exists... $sql="SELECT email FROM Users WHERE email='$username'"; $sql=mysqli_real_escape_string($connect, $sql); $query = mysqli_query($connect,$sql); if (mysqli_num_rows($query) != 0) { // User already exists so check pw and set session varb to logged in echo "user exists"; } else { // Need to create user. echo "user $username does not exist"; // Adds the details to the db? $sql="INSERT INTO Users (email, password) VALUES ('$username', '$pwh');"; $sql=mysqli_real_escape_string($connect, $sql); $query2=mysqli_query($connect,$sql); if ($query2) { echo "New record created successfully"; } else { //echo "Error: " . $sql . "<br>" . $connect->error; echo "error" ; } } } else { // Stuff to do when not connected... echo "problemo"; } ?>

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.00318.31
8.3.50.0140.00616.21
8.3.40.0120.00318.82
8.3.30.0140.00318.63
8.3.20.0080.00020.30
8.3.10.0000.00821.73
8.3.00.0040.00419.79
8.2.180.0110.00418.54
8.2.170.0200.00322.96
8.2.160.0100.00619.09
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00419.27
8.2.120.0080.00026.35
8.2.110.0040.00422.05
8.2.100.0080.00417.78
8.2.90.0060.00317.63
8.2.80.0060.00318.73
8.2.70.0050.00317.80
8.2.60.0000.00917.98
8.2.50.0000.00819.03
8.2.40.0030.00521.06
8.2.30.0020.00519.11
8.2.20.0040.00418.04
8.2.10.0040.00418.11
8.2.00.0000.00718.14
8.1.280.0110.00725.92
8.1.270.0070.00022.19
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00724.05
8.1.230.0080.00417.70
8.1.220.0000.00817.79
8.1.210.0050.00318.77
8.1.200.0000.00917.22
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0080.00018.50
8.1.160.0000.00718.96
8.1.150.0000.00918.86
8.1.140.0000.00719.48
8.1.130.0000.00718.91
8.1.120.0030.00317.47
8.1.110.0040.00417.38
8.1.100.0040.00417.48
8.1.90.0000.00717.34
8.1.80.0000.00917.48
8.1.70.0000.00717.47
8.1.60.0000.00817.54
8.1.50.0000.00817.50
8.1.40.0130.00517.52
8.1.30.0000.00717.68
8.1.20.0040.00417.71
8.1.10.0040.00417.52
8.1.00.0000.00717.57
8.0.300.0040.00418.77
8.0.290.0090.00016.75
8.0.280.0030.00318.55
8.0.270.0030.00317.14
8.0.260.0040.00416.83
8.0.250.0050.00317.02
8.0.240.0060.00316.98
8.0.230.0030.00316.96
8.0.220.0070.00016.93
8.0.210.0030.00316.80
8.0.200.0000.00717.00
8.0.190.0030.00516.90
8.0.180.0070.00016.91
8.0.170.0000.00816.97
8.0.160.0000.00716.83
8.0.150.0030.00316.83
8.0.140.0000.00816.90
8.0.130.0060.00013.35
8.0.120.0040.00416.87
8.0.110.0000.00716.79
8.0.100.0040.00416.80
8.0.90.0040.00416.80
8.0.80.0120.00616.86
8.0.70.0000.00717.01
8.0.60.0070.00017.00
8.0.50.0000.00717.04
8.0.30.0110.00817.14
8.0.20.0090.01117.40
8.0.10.0040.00416.98
8.0.00.0150.00316.91
7.4.330.0020.00215.55
7.4.320.0030.00316.48
7.4.300.0000.00616.63
7.4.290.0030.00316.68
7.4.280.0040.00416.60
7.4.270.0030.00316.56
7.4.260.0070.00016.48
7.4.250.0030.00316.38
7.4.240.0030.00316.63
7.4.230.0030.00316.52
7.4.220.0030.01416.59
7.4.210.0070.00716.73
7.4.200.0030.00316.62
7.4.160.0070.00916.57
7.4.150.0090.00917.40
7.4.140.0160.00617.86
7.4.130.0090.01216.57
7.4.120.0100.00916.50
7.4.110.0100.00716.43
7.4.100.0100.01016.54
7.4.90.0090.00916.72
7.4.80.0090.01219.39
7.4.70.0040.01216.57
7.4.60.0100.00716.33
7.4.50.0000.01816.38
7.4.40.0130.00316.57
7.4.30.0060.00916.48
7.4.00.0080.01014.98
7.3.330.0020.00213.21
7.3.320.0020.00312.98
7.3.310.0040.00416.12
7.3.300.0060.00016.30
7.3.290.0070.00716.26
7.3.280.0100.00716.28
7.3.270.0110.01117.40
7.3.260.0120.00616.38
7.3.250.0100.00916.31
7.3.240.0140.00816.34
7.3.230.0090.00916.26
7.3.210.0120.00916.60
7.3.200.0120.00616.46
7.3.190.0070.01016.50
7.3.180.0030.01316.21
7.3.170.0200.00216.46
7.3.160.0080.00816.26
7.3.120.0060.00614.78
7.3.110.0100.00314.99
7.3.100.0000.01414.77
7.3.90.0040.01114.97
7.3.80.0030.00714.63
7.3.70.0070.00714.71
7.3.60.0110.00414.89
7.3.50.0000.01014.61
7.3.40.0040.00414.70
7.3.30.0060.00614.52
7.3.20.0030.00916.36
7.3.10.0060.00916.51
7.3.00.0070.00716.68
7.2.330.0070.01016.67
7.2.320.0110.00516.53
7.2.310.0100.00716.51
7.2.300.0030.01416.48
7.2.290.0140.00516.64
7.2.250.0100.00314.88
7.2.240.0100.00614.76
7.2.230.0060.00614.96
7.2.220.0070.01014.79
7.2.210.0000.01715.00
7.2.200.0030.01214.89
7.2.190.0070.00714.81
7.2.180.0090.00614.89
7.2.170.0040.01414.62
7.2.60.0140.00716.94
7.2.00.0000.01119.11
7.1.330.0030.01315.83
7.1.320.0070.00715.74
7.1.310.0000.01115.71
7.1.300.0060.00315.55
7.1.290.0110.00315.62
7.1.280.0060.00615.48
7.1.270.0000.00815.52
7.1.260.0040.00715.67
7.1.200.0020.00515.57
7.1.100.0060.00918.11
7.1.70.0000.01316.91
7.1.60.0190.01335.15
7.1.50.0180.01234.60
7.1.40.0230.01134.36
7.1.30.0200.01334.36
7.1.20.0130.01334.45
7.1.10.0090.00916.42
7.1.00.0000.01716.44
7.0.200.0060.00616.77
7.0.190.0060.00616.52
7.0.180.0050.01316.31
7.0.170.0030.01316.10
7.0.160.0000.01416.19
7.0.150.0100.00616.34
7.0.140.0060.01216.26
7.0.130.0030.01416.59
7.0.120.0030.01316.62
7.0.110.0030.01416.39
7.0.100.0070.01016.31
7.0.90.0060.01016.16
7.0.80.0030.01416.18
7.0.70.0030.01416.06
7.0.60.0030.00916.11
7.0.50.0000.01716.02
7.0.40.0100.00716.29
7.0.30.0070.00716.41
7.0.20.0120.00316.07
7.0.10.0060.00916.44
7.0.00.0070.00716.46

preferences:
52.08 ms | 401 KiB | 5 Q