3v4l.org

run code in 300+ PHP versions simultaneously
<html> <body> <?php if(isset($_POST['login'])) { $username = $_POST['username']; $password = $_POST['password']; $con = mysqli_connect("localhost","compsec","compsec","mydb"); $result = mysqli_query($con, "SELECT * FROM `users` WHERE username='$username' AND password='$password'"); if(mysqli_num_rows($result) == 0) echo 'You have entered an invalid username and/or password'; else echo '<h1>Successfully logged in.</h1><p>This text will only be displayed when you have logged in with valid credentials.</p>'; } else { ?> <form action="" method="post"> Username: <input type="text" name="username"/><br /> Password: <input type="password" name="password"/><br /> <input type="submit" name="login" value="Login"/> </form> <?php } ?> </body> </html>

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.0100.01318.55
8.3.50.0150.00616.29
8.3.40.0110.00418.70
8.3.30.0000.01518.76
8.3.20.0080.00018.78
8.3.10.0000.00821.77
8.3.00.0080.00021.81
8.2.180.0080.00816.75
8.2.170.0110.00722.96
8.2.160.0030.01018.99
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0040.00419.69
8.2.110.0060.00321.06
8.2.100.0060.00617.91
8.2.90.0080.00317.79
8.2.80.0000.00817.97
8.2.70.0040.00417.91
8.2.60.0000.00818.22
8.2.50.0000.00918.10
8.2.40.0080.00019.39
8.2.30.0040.00419.34
8.2.20.0040.00418.09
8.2.10.0040.00418.18
8.2.00.0050.00317.63
8.1.280.0130.00725.92
8.1.270.0050.00320.20
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0040.00422.17
8.1.230.0070.00422.63
8.1.220.0060.00317.74
8.1.210.0040.00418.97
8.1.200.0090.00317.35
8.1.190.0040.00417.53
8.1.180.0040.00418.10
8.1.170.0090.00018.60
8.1.160.0040.00418.78
8.1.150.0000.00718.79
8.1.140.0040.00422.00
8.1.130.0030.00320.14
8.1.120.0040.00417.43
8.1.110.0040.00417.48
8.1.100.0000.00717.49
8.1.90.0000.00817.44
8.1.80.0000.00917.35
8.1.70.0000.00717.43
8.1.60.0040.00417.52
8.1.50.0000.00817.45
8.1.40.0070.00017.38
8.1.30.0030.00617.64
8.1.20.0080.00017.51
8.1.10.0000.00717.53
8.1.00.0090.00017.45
8.0.300.0050.00319.59
8.0.290.0000.00816.63
8.0.280.0040.00418.45
8.0.270.0080.00017.22
8.0.260.0000.00620.15
8.0.250.0030.00316.82
8.0.240.0000.00716.99
8.0.230.0050.00216.95
8.0.220.0000.00816.83
8.0.210.0030.00316.88
8.0.200.0000.00716.79
8.0.190.0000.00716.93
8.0.180.0060.00316.89
8.0.170.0080.00016.89
8.0.160.0060.00316.73
8.0.150.0040.00416.79
8.0.140.0000.00716.88
8.0.130.0000.00613.28
8.0.120.0030.00616.68
8.0.110.0000.00716.78
8.0.100.0070.00016.89
8.0.90.0030.00516.82
8.0.80.0100.01016.82
8.0.70.0030.00516.90
8.0.60.0070.00016.93
8.0.50.0040.00416.84
8.0.30.0130.00617.14
8.0.20.0110.00817.40
8.0.10.0040.00416.86
8.0.00.0070.01016.65
7.4.330.0000.00515.55
7.4.320.0030.00316.55
7.4.300.0040.00416.48
7.4.290.0040.00416.61
7.4.280.0000.00816.59
7.4.270.0030.00316.37
7.4.260.0000.00716.55
7.4.250.0000.00816.45
7.4.240.0030.00316.47
7.4.230.0000.00816.38
7.4.220.0030.00516.59
7.4.210.0040.01016.47
7.4.200.0000.00716.39
7.4.160.0110.00616.38
7.4.140.0100.00717.86
7.4.130.0130.00416.48
7.4.120.0110.00716.46
7.4.110.0120.00816.73
7.4.100.0060.01116.43
7.4.90.0090.00916.33
7.4.80.0100.00619.39
7.4.70.0080.00816.61
7.4.60.0100.02016.45
7.4.50.0040.01416.35
7.4.40.0070.01016.61
7.4.10.0030.01314.98
7.4.00.0000.01415.01
7.3.330.0020.00213.08
7.3.320.0000.00613.07
7.3.310.0040.00416.09
7.3.300.0030.00316.03
7.3.290.0040.00416.21
7.3.280.0110.00516.20
7.3.260.0130.00716.37
7.3.240.0070.00916.42
7.3.230.0070.01616.16
7.3.210.0090.00616.25
7.3.200.0110.00516.23
7.3.190.0080.01316.25
7.3.180.0120.00916.48
7.3.170.0030.01516.25
7.3.160.0130.01016.20
7.3.130.0030.01314.98
7.3.120.0090.00614.70
7.3.110.0070.01014.77
7.3.100.0080.00614.54
7.3.90.0000.01914.76
7.3.80.0100.00714.59
7.3.70.0070.00714.71
7.3.60.0060.01014.74
7.3.50.0090.00614.69
7.3.40.0040.01215.00
7.3.30.0040.01114.64
7.3.20.0030.00916.59
7.3.10.0070.00716.58
7.3.00.0030.01016.64
7.2.330.0080.00816.54
7.2.320.0100.01016.59
7.2.310.0100.00616.65
7.2.300.0030.01316.57
7.2.290.0170.00316.61
7.2.260.0000.01115.03
7.2.250.0090.00914.83
7.2.240.0090.00614.94
7.2.230.0070.01115.05
7.2.220.0000.01214.98
7.2.210.0030.01314.99
7.2.200.0130.00314.80
7.2.190.0060.00914.88
7.2.180.0050.00514.92
7.2.170.0100.00314.77
7.2.160.0000.01514.96
7.2.150.0110.00416.54
7.2.140.0000.01516.73
7.2.130.0030.00816.89
7.2.120.0030.00916.91
7.2.110.0980.00615.62
7.2.100.0680.00815.75
7.2.90.0700.00915.80
7.2.80.0750.00315.55
7.2.70.0760.00515.93
7.2.60.0810.00515.77
7.2.50.0800.00715.97
7.2.40.0770.00315.80
7.2.30.0680.01015.73
7.2.20.0800.00915.73
7.2.10.0860.00915.92
7.2.00.0820.00615.64
7.1.330.0070.00715.34
7.1.320.0040.01515.55
7.1.310.0000.01315.66
7.1.300.0070.00715.66
7.1.290.0000.01315.37
7.1.280.0060.00915.74
7.1.270.0000.01715.45
7.1.260.0070.00715.42
7.1.250.0030.00915.70
7.1.240.0130.00015.56
7.1.230.0800.00514.71
7.1.220.0760.00314.64
7.1.210.0750.00614.63
7.1.200.0750.00614.67
7.1.190.0740.00914.69
7.1.180.1040.00614.75
7.1.170.0970.00614.62
7.1.160.1140.00614.92
7.1.150.0710.00814.82
7.1.140.0660.00714.65
7.1.130.0870.00914.84
7.1.120.1050.00714.77
7.1.110.0890.01214.78
7.1.100.1120.00614.67
7.1.90.1330.00714.71
7.1.80.0910.00814.58
7.1.70.1150.01014.62
7.1.60.1180.00823.84
7.1.50.1090.01223.54
7.1.40.1500.00923.54
7.1.30.1060.00823.70
7.1.20.1260.00823.74
7.1.10.0990.00614.78
7.1.00.0990.00514.72
7.0.330.0070.00315.36
7.0.320.0060.00315.08
7.0.310.0030.00715.33
7.0.300.0140.00015.12
7.0.290.0000.00915.27
7.0.280.0060.00315.42
7.0.270.0060.00615.37
7.0.260.0070.00715.32
7.0.250.0100.00715.32
7.0.240.0140.00415.40
7.0.230.0000.00815.37
7.0.220.0000.01015.46
7.0.210.0040.00815.18
7.0.200.0030.01015.18
7.0.190.0070.00715.47
7.0.180.0060.00615.42
7.0.170.0040.00415.04
7.0.160.0040.00915.46
7.0.150.0000.00915.13
7.0.140.0040.00815.37
7.0.130.0000.01514.95
7.0.120.0060.00615.32
7.0.110.0080.00415.35
7.0.100.0100.00614.98
7.0.90.0060.00615.21
7.0.80.0130.00015.12
7.0.70.0070.01015.45
7.0.60.0070.00315.36
7.0.50.0070.00715.49
7.0.40.0040.00713.43
7.0.30.0070.00313.47
7.0.20.0040.01113.41
7.0.10.0030.01013.41
7.0.00.0060.00613.39
5.6.400.0150.00014.60
5.6.390.0000.00913.84
5.6.380.0070.00614.20
5.6.370.0000.01314.22
5.6.360.0070.00714.12
5.6.350.0000.01214.26
5.6.340.0040.00414.34
5.6.330.0030.00614.60
5.6.320.0060.01214.71
5.6.310.0000.01714.32
5.6.300.0030.00714.30
5.6.290.0080.00414.38
5.6.280.0040.01114.28
5.6.270.0060.00614.04
5.6.260.0060.00314.27
5.6.250.0030.01014.25
5.6.240.0000.01514.49
5.6.230.0060.00814.41
5.6.220.0030.01414.26
5.6.210.0100.00314.46
5.6.200.0060.00914.30
5.6.190.0000.01314.42
5.6.180.0100.00314.37
5.6.170.0000.01414.42
5.6.160.0060.00914.58
5.6.150.0000.00814.25
5.6.140.0030.00614.65
5.6.130.0090.00614.20
5.6.120.0070.00714.31
5.6.110.0030.01214.56
5.6.100.0040.00414.26
5.6.90.0060.00314.54
5.6.80.0030.01314.10
5.6.70.0030.01314.09
5.6.60.0040.01114.43
5.6.50.0040.01214.50
5.6.40.0030.01014.05
5.6.30.0040.00414.33
5.6.20.0000.01114.32
5.6.10.0030.01014.09
5.6.00.0040.00814.20

preferences:
55.2 ms | 401 KiB | 5 Q