3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_start(); //research the use of this session_start(); //needed to create sessions - maintaining state is discussed above. ini_set('display_errors', 1); //turn on errors, use for debugging. $username = $_POST['username']; //refer to the superglobal arrays section above $password = $_POST['password']; $authorized = false; require ('dbconnection.php'); $sql = 'SELECT * from Login'; $rs = $conn->Execute($sql); //Using a While looping structure to check each record in the database while (!$rs->EOF) { if ($rs->Fields["UserName"]->Value=="$username" && $rs->Fields["Password"]->Value=="$password") { $_SESSION['auth'] = $rs->Fields['Auth']->Value; $_SESSION['username'] = $rs->Fields['UserName']->Value; $authorized = true; } $rs->MoveNext(); } # close the connection $rs->Close(); $conn->Close(); $rs = null; $conn = null; if (!$authorized) { header('loginInvalid.php'); // see pseudocode for authorize.php exit(); } else { header('index.php'); exit(); } ?>

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.0120.00917.00
8.3.50.0100.00921.14
8.3.40.0080.00819.09
8.3.30.0070.00719.17
8.3.20.0040.00420.26
8.3.10.0090.00021.98
8.3.00.0040.00417.63
8.2.180.0130.00616.63
8.2.170.0100.01022.96
8.2.160.0100.01020.35
8.2.150.0000.00824.18
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.61
8.2.110.0060.00321.94
8.2.100.0030.01019.70
8.2.90.0090.00019.35
8.2.80.0040.00417.97
8.2.70.0080.00017.63
8.2.60.0000.00818.03
8.2.50.0080.00018.07
8.2.40.0030.00718.22
8.2.30.0070.00318.48
8.2.20.0040.00417.94
8.2.10.0000.00818.21
8.2.00.0040.00418.09
8.1.280.0070.01425.92
8.1.270.0000.00920.42
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00723.96
8.1.230.0070.00419.21
8.1.220.0030.00617.79
8.1.210.0040.00418.77
8.1.200.0090.00017.60
8.1.190.0030.00517.25
8.1.180.0030.00518.10
8.1.170.0080.00018.63
8.1.160.0040.00422.01
8.1.150.0000.00718.99
8.1.140.0000.00817.43
8.1.130.0000.00717.95
8.1.120.0070.00317.60
8.1.110.0000.00917.59
8.1.100.0040.00417.39
8.1.90.0000.00717.55
8.1.80.0070.00017.56
8.1.70.0040.00417.51
8.1.60.0040.00417.68
8.1.50.0050.00317.72
8.1.40.0000.00917.57
8.1.30.0000.00717.75
8.1.20.0080.00017.84
8.1.10.0040.00417.55
8.1.00.0030.00617.70
8.0.300.0040.00418.77
8.0.290.0060.00317.00
8.0.280.0000.00718.64
8.0.270.0000.00717.34
8.0.260.0070.00017.38
8.0.250.0030.00317.16
8.0.240.0000.00717.03
8.0.230.0040.00417.03
8.0.220.0050.00317.08
8.0.210.0000.00716.98
8.0.200.0000.01017.13
8.0.190.0000.00817.12
8.0.180.0040.00417.09
8.0.170.0040.00417.14
8.0.160.0000.00717.07
8.0.150.0000.00717.13
8.0.140.0040.00417.08
8.0.130.0060.00013.55
8.0.120.0040.00417.11
8.0.110.0000.00817.04
8.0.100.0040.00416.89
8.0.90.0070.00017.04
8.0.80.0080.01417.06
8.0.70.0000.00717.10
8.0.60.0000.00717.07
8.0.50.0060.00316.88
8.0.30.0100.01217.17
8.0.20.0060.01217.40
8.0.10.0040.00417.09
8.0.00.0070.01116.82
7.4.330.0030.00315.22
7.4.320.0060.00016.55
7.4.300.0000.00716.63
7.4.290.0080.00016.64
7.4.280.0080.00016.61
7.4.270.0030.00316.58
7.4.260.0040.00416.71
7.4.250.0050.00316.52
7.4.240.0020.00616.61
7.4.230.0040.00416.77
7.4.220.0150.00316.74
7.4.210.0130.00316.69
7.4.200.0030.00316.46
7.4.160.0130.00316.68
7.4.150.0120.00617.40
7.4.140.0070.01417.86
7.4.130.0130.00516.59
7.4.120.0140.00416.70
7.4.110.0110.01216.65
7.4.100.0120.00916.52
7.4.90.0060.01216.50
7.4.80.0090.00919.39
7.4.70.0100.01016.53
7.4.60.0090.00916.55
7.4.50.0050.00316.42
7.4.40.0000.01616.57
7.4.30.0170.00016.49
7.4.00.0100.00715.27
7.3.330.0000.00513.20
7.3.320.0030.00313.25
7.3.310.0000.00716.50
7.3.300.0070.00016.41
7.3.290.0050.00916.43
7.3.280.0060.01016.38
7.3.270.0100.00717.40
7.3.260.0090.00916.66
7.3.250.0110.01016.45
7.3.240.0170.00316.36
7.3.230.0170.00716.46
7.3.210.0120.00616.42
7.3.200.0110.00519.39
7.3.190.0070.01016.48
7.3.180.0030.01316.55
7.3.170.0110.01016.56
7.3.160.0070.01016.39
7.2.330.0100.00616.50
7.2.320.0100.00716.34
7.2.310.0080.00816.81
7.2.300.0100.00716.68
7.2.290.0060.01216.41
7.2.60.0060.00917.00
7.2.00.0060.00619.27
7.1.200.0030.01015.82
7.1.100.0130.00618.21
7.1.70.0000.01116.89
7.1.60.0100.01419.50
7.1.50.0100.01016.52
7.1.00.0100.07022.28
7.0.200.0000.01016.61
7.0.60.0170.07320.00
7.0.50.0030.08717.93
7.0.40.0130.06720.24
7.0.30.0200.03720.18
7.0.20.0200.06720.18
7.0.10.0100.06320.19
7.0.00.0000.05020.04
5.6.280.0000.07720.92
5.6.210.0170.07320.75
5.6.200.0100.05318.16
5.6.190.0170.08020.44
5.6.180.3970.03320.68
5.6.170.0230.05020.49
5.6.160.0070.08320.72
5.6.150.0130.07318.24
5.6.140.0170.07018.23
5.6.130.0100.05718.12
5.6.120.0000.04721.05
5.6.110.0070.07721.12
5.6.100.0030.07721.02
5.6.90.0000.06321.11
5.6.80.0070.05320.25
5.5.350.0200.07320.41
5.5.340.0030.07317.96
5.5.330.0000.05020.16
5.5.320.4170.03020.18
5.5.310.0330.07020.27
5.5.300.0030.04318.00
5.5.290.0070.03717.93
5.5.280.0130.07320.83
5.5.270.0200.06320.65
5.5.260.0070.07020.98
5.5.250.0070.03720.50
5.5.240.0230.06720.08
5.4.450.0870.03719.27
5.4.440.0900.03019.39
5.4.430.0030.03319.55
5.4.420.0100.05719.43
5.4.410.0270.05318.96
5.4.400.0170.06718.72
5.4.390.0100.06018.62
5.4.380.0030.06718.73
5.4.370.0100.05718.50
5.4.360.0130.05018.54
5.4.350.0130.05718.85
5.4.340.0070.06718.73
5.4.320.0130.06718.72
5.4.310.0130.06018.67
5.4.300.0270.06018.64
5.4.290.0170.05018.70
5.4.280.0230.06018.59
5.4.270.0200.07318.68
5.4.260.0200.06318.58
5.4.250.0030.06718.61
5.4.240.0200.05318.70
5.4.230.0030.07318.54
5.4.220.0230.05318.84
5.4.210.0070.08018.60
5.4.200.0100.07316.56
5.4.190.0130.05318.48
5.4.180.0100.07318.83
5.4.170.0170.05318.57
5.4.160.0070.05718.78
5.4.150.0130.05318.51
5.4.140.0100.07316.26
5.4.130.0070.07316.16
5.4.120.0170.05316.25
5.4.110.0070.05716.27
5.4.100.0100.05716.15
5.4.90.0170.05316.27
5.4.80.0100.05316.35
5.4.70.0100.05316.12
5.4.60.0230.04016.21
5.4.50.0070.07016.12
5.4.40.0130.05016.25
5.4.30.0130.05316.11
5.4.20.0070.05716.24
5.4.10.0100.05016.20
5.4.00.0070.05315.77
5.3.290.0070.06014.67
5.3.280.0100.07314.61
5.3.270.0100.07714.56
5.3.260.0100.06314.60
5.3.250.0100.06014.66
5.3.240.0100.06014.59
5.3.230.0030.05714.61
5.3.220.0170.04714.66
5.3.210.0070.06314.68
5.3.200.0130.04714.48
5.3.190.0170.04714.66
5.3.180.0100.05714.66
5.3.170.0170.05714.54
5.3.160.0170.05014.64
5.3.150.0130.05014.56
5.3.140.0070.05714.59
5.3.130.0070.05714.48
5.3.120.0130.05014.55
5.3.110.0070.05714.57
5.3.100.0130.06714.01
5.3.90.0030.06314.13
5.3.80.0100.05714.03
5.3.70.0200.04014.13
5.3.60.0100.05314.02
5.3.50.0130.05013.90
5.3.40.0030.06313.94
5.3.30.0170.04013.92
5.3.20.0270.03713.71
5.3.10.0130.05013.66
5.3.00.0070.05313.63
5.2.170.0000.05011.15
5.2.160.0070.05011.29
5.2.150.0030.04711.20
5.2.140.0070.04711.22
5.2.130.0070.04311.05
5.2.120.0030.04311.16
5.2.110.0100.05011.14
5.2.100.0070.06311.19
5.2.90.0170.05011.11
5.2.80.0070.06311.29
5.2.70.0100.05311.08
5.2.60.0030.06711.11
5.2.50.0100.04311.08
5.2.40.0200.04711.05
5.2.30.0000.05010.98
5.2.20.0470.05010.92
5.2.10.0530.04310.81
5.2.00.0770.05710.70
5.1.60.1070.0339.86
5.1.50.0570.04310.01
5.1.40.0630.0479.83
5.1.30.0970.04010.33
5.1.20.1730.03710.30
5.1.10.1070.04010.08
5.1.00.0730.0339.91
5.0.50.0500.0278.39
5.0.40.0330.0308.42
5.0.30.0630.0638.30
5.0.20.0270.0338.23
5.0.10.0300.0338.18
5.0.00.0370.0478.18
4.4.90.0270.0236.85
4.4.80.0330.0206.85
4.4.70.0400.0236.85
4.4.60.0300.0206.85
4.4.50.0330.0236.84
4.4.40.0400.0406.84
4.4.30.0400.0206.85
4.4.20.0430.0306.85
4.4.10.0530.0306.86
4.4.00.0530.0376.86
4.3.110.0270.0236.86
4.3.100.0400.0236.86
4.3.90.0470.0236.86
4.3.80.0100.0376.86
4.3.70.0370.0276.86
4.3.60.0370.0236.86
4.3.50.0300.0336.86
4.3.40.0470.0376.86
4.3.30.0300.0136.86
4.3.20.0170.0276.86
4.3.10.0170.0236.86
4.3.00.0170.0206.86

preferences:
53.36 ms | 401 KiB | 5 Q