3v4l.org

run code in 300+ PHP versions simultaneously
<?php require("db.php"); mysql_connect($DBserver, $DBuser, $DBpass) or die(mysql_error()); mysql_select_db($DBname) or die(mysql_error()); // Get data from the "CRFAds" table $result = mysql_query("SELECT * FROM CRFAds WHERE SubmitterName Like 'David%'") or die(mysql_error()); // Keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { //Get Ad Start Date $AdStartDate = date("F d, Y",strtotime($row['StartDate'])); //Check to see if it is either new (expires in 90 days) or a renewal (expires in 120 days) If ($row['NewOrRenewal']=="Renewal") { $AdExpirationDate = date("F d, Y",strtotime($row['StartDate'] . '+120 days')); //Calculate the difference between expiration date and today to see if it expires within 30 days $today = date("F d, Y"); $DayDiff = abs(strtotime($AdExpirationDate) - strtotime($today)); $DaysToExpiration = floor(($DayDiff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24)); if ($DaysToExpiration <= 30) { $Expire30 = "Yes"; }else{ $Expire30 = "No"; } }else{ $AdExpirationDate = date("F d, Y",strtotime($row['StartDate'] . '+90 days')); //Calculate the difference between expiration date and today to see if it expires within 30 days $today = date("F d, Y"); $DayDiff1 = abs(strtotime($AdExpirationDate) - strtotime($today)); $DaysToExpiration = floor(($DayDiff1- $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24)); if ($DaysToExpiration <= 30) { $Expire30 = "Yes"; }else{ $Expire30 = "No"; } } //Calculate the difference between today and start date to see if it is new within the last 30 days $DayDiff2 = abs(strtotime($AdStartDate) - strtotime($today)); $DaysRunning = floor(($DayDiff2- $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24)); if ($DaysRunning <= 30) { $New30 = "Yes"; }else{ $New30 = "No"; } } ?>

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.01118.52
8.3.50.0120.00622.09
8.3.40.0090.00618.95
8.3.30.0090.01219.29
8.3.20.0000.00820.20
8.3.10.0040.00423.48
8.3.00.0040.00422.42
8.2.180.0140.00316.88
8.2.170.0140.00422.96
8.2.160.0100.00320.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0110.00726.16
8.2.120.0070.00022.13
8.2.110.0100.00022.24
8.2.100.0080.00417.78
8.2.90.0060.00319.05
8.2.80.0060.00317.97
8.2.70.0080.00017.50
8.2.60.0060.00617.68
8.2.50.0030.00618.07
8.2.40.0050.00318.28
8.2.30.0040.00418.20
8.2.20.0040.00417.68
8.2.10.0070.00017.77
8.2.00.0000.00717.84
8.1.280.0090.01225.92
8.1.270.0000.00823.80
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00323.88
8.1.230.0060.00619.20
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0030.00617.36
8.1.190.0040.00417.66
8.1.180.0050.00318.10
8.1.170.0060.00318.68
8.1.160.0030.00521.99
8.1.150.0050.00218.64
8.1.140.0040.00417.49
8.1.130.0040.00417.74
8.1.120.0000.00717.43
8.1.110.0030.00617.48
8.1.100.0040.00417.34
8.1.90.0050.00317.35
8.1.80.0040.00417.37
8.1.70.0040.00417.30
8.1.60.0060.00317.66
8.1.50.0040.00417.54
8.1.40.0000.00717.59
8.1.30.0030.00517.66
8.1.20.0080.00017.65
8.1.10.0000.00817.52
8.1.00.0040.00417.43
8.0.300.0070.00018.77
8.0.290.0040.00417.30
8.0.280.0070.00018.62
8.0.270.0000.00717.39
8.0.260.0030.00316.87
8.0.250.0000.00717.15
8.0.240.0040.00417.12
8.0.230.0030.00517.11
8.0.220.0030.00317.07
8.0.210.0030.00316.94
8.0.200.0090.00016.97
8.0.190.0000.00917.20
8.0.180.0040.00417.11
8.0.170.0040.00417.03
8.0.160.0000.00716.95
8.0.150.0000.00817.09
8.0.140.0000.00717.09
8.0.130.0000.00513.47
8.0.120.0000.00817.07
8.0.110.0000.00817.04
8.0.100.0070.00016.91
8.0.90.0040.00417.03
8.0.80.0100.00717.06
8.0.70.0000.00817.04
8.0.60.0000.00717.03
8.0.50.0030.00516.97
8.0.30.0110.01217.05
8.0.20.0100.00717.40
8.0.10.0040.00417.07
8.0.00.0090.01816.74
7.4.330.0000.00615.05
7.4.320.0000.00616.58
7.4.300.0080.00316.66
7.4.290.0030.00316.70
7.4.280.0040.00416.66
7.4.270.0030.00316.47
7.4.260.0040.00416.51
7.4.250.0040.00416.43
7.4.240.0040.00316.65
7.4.230.0000.00816.42
7.4.220.0220.00616.62
7.4.210.0130.00316.58
7.4.200.0000.00716.77
7.4.190.0030.00316.82
7.4.160.0050.01116.44
7.4.150.0120.00817.40
7.4.140.0110.00817.86
7.4.130.0100.00716.53
7.4.120.0080.01016.55
7.4.110.0030.01316.56
7.4.100.0100.01016.57
7.4.90.0110.01816.67
7.4.80.0100.01019.39
7.4.70.0150.00316.69
7.4.60.0110.00616.58
7.4.50.0090.00016.70
7.4.40.0060.00922.77
7.4.30.0110.01116.58
7.4.00.0070.01015.03
7.3.330.0000.00513.19
7.3.320.0020.00213.04
7.3.310.0070.00016.38
7.3.300.0030.00316.36
7.3.290.0030.01216.33
7.3.280.0060.01016.35
7.3.270.0030.01417.40
7.3.260.0070.01516.54
7.3.250.0110.00716.40
7.3.240.0170.00416.48
7.3.230.0140.00316.39
7.3.210.0130.00516.55
7.3.200.0100.00619.39
7.3.190.0130.00616.23
7.3.180.0030.01216.46
7.3.170.0120.00316.31
7.3.160.0120.00316.41
7.3.120.0070.00914.87
7.3.110.0030.01014.47
7.3.100.0090.00915.00
7.3.90.0100.00014.63
7.3.80.0070.00414.94
7.3.70.0120.00414.74
7.3.60.0000.01214.86
7.3.50.0040.00714.72
7.3.40.0030.01014.86
7.3.30.0000.00914.81
7.3.20.0100.00316.67
7.3.10.0030.00716.52
7.3.00.0000.01216.55
7.2.330.0030.01316.64
7.2.320.0090.00916.60
7.2.310.0100.00716.71
7.2.300.0090.00716.67
7.2.290.0090.01216.55
7.2.250.0090.00915.05
7.2.240.0100.00614.90
7.2.230.0000.01114.72
7.2.220.0060.00614.91
7.2.210.0070.00715.00
7.2.200.0030.01015.08
7.2.190.0000.01015.07
7.2.180.0130.00314.88
7.2.170.0000.00914.80
7.2.00.0070.00719.32
7.1.330.0030.01015.51
7.1.320.0080.00415.71
7.1.310.0040.01115.81
7.1.300.0050.00315.73
7.1.290.0040.00715.67
7.1.280.0060.00615.77
7.1.270.0060.00615.71
7.1.260.0030.00915.60
7.1.100.0040.00717.63
7.1.70.0030.00716.83
7.1.60.0100.01319.29
7.1.50.0040.01516.62
7.1.00.0000.07722.37
7.0.200.0000.00716.70
7.0.140.0000.07722.06
7.0.90.0030.08719.87
7.0.80.0030.04719.91
7.0.70.0270.03319.89
7.0.60.0300.07319.97
7.0.50.0030.03720.33
7.0.40.0100.05720.15
7.0.30.0070.08720.13
7.0.20.0070.04320.13
7.0.10.0100.07020.04
7.0.00.0000.04720.10
5.6.280.0070.07021.02
5.6.240.0030.08320.64
5.6.230.0170.07020.46
5.6.220.0030.04020.60
5.6.210.0000.06720.71
5.6.200.0070.06721.11
5.6.190.0070.04721.09
5.6.180.0030.04720.95
5.6.170.0070.05721.03
5.6.160.0070.05721.02
5.6.150.0100.03021.11
5.6.140.0070.06721.09
5.6.130.0100.07020.95
5.6.120.0070.07020.97
5.6.110.0070.04321.11
5.6.100.0070.04321.11
5.6.90.0170.03320.92
5.6.80.0030.05720.45
5.6.70.0200.07020.56
5.6.60.0130.07720.42
5.6.50.0100.04020.43
5.6.40.0000.07320.50
5.6.30.0030.04720.55
5.6.20.0030.08020.37
5.6.10.0070.07020.45
5.6.00.0200.03020.43
5.5.380.0130.05020.45
5.5.370.0070.06320.45
5.5.360.0070.04020.40
5.5.350.0030.05320.36
5.5.340.0030.03720.90
5.5.330.0070.04020.93
5.5.320.0030.05720.89
5.5.310.0200.04320.79
5.5.300.0130.07020.93
5.5.290.0100.03720.90
5.5.280.0070.04320.90
5.5.270.0070.04320.93
5.5.260.0030.04720.93
5.5.250.0070.05720.46
5.5.240.0070.04020.23
5.5.230.0070.08320.13
5.5.220.0030.07720.22
5.5.210.0030.03720.27
5.5.200.0100.05020.29
5.5.190.0170.08020.26
5.5.180.0130.07320.22
5.5.160.0100.07320.16
5.5.150.0070.07720.15
5.5.140.0000.05020.23
5.5.130.0000.05320.12
5.5.120.0070.03720.27
5.5.110.0100.05020.22
5.5.100.0000.07719.96
5.5.90.0100.07020.17
5.5.80.0000.05020.09
5.5.70.0000.06320.16
5.5.60.0000.05020.04
5.5.50.0030.04020.06
5.5.40.0000.05020.16
5.5.30.0030.04720.11
5.5.20.0100.04020.16
5.5.10.0070.06020.07
5.5.00.0070.04020.02
5.4.450.0100.06019.45
5.4.440.0100.08019.43
5.4.430.0070.04019.56
5.4.420.0170.03019.49
5.4.410.0070.06718.99
5.4.400.0100.06318.99
5.4.390.0200.07019.15
5.4.380.0000.07019.16
5.4.370.0130.07018.80
5.4.360.0000.04019.14
5.4.350.0070.03018.99
5.4.340.0100.04018.99
5.4.320.0170.08319.13
5.4.310.0070.08319.12
5.4.300.0100.03318.91
5.4.290.0200.02719.24
5.4.280.0070.03718.79
5.4.270.0030.03319.15
5.4.260.0130.06319.08
5.4.250.0070.03718.91
5.4.240.0200.05018.79
5.4.230.0070.06018.90
5.4.220.0070.03718.98
5.4.210.0070.06719.04
5.4.200.0000.04318.95
5.4.190.0000.04019.07
5.4.180.0070.08318.79
5.4.170.0070.03019.07
5.4.160.0030.04019.11
5.4.150.0030.04019.19
5.4.140.0000.03316.39
5.4.130.0000.06316.37
5.4.120.0100.03316.28
5.4.110.0030.07716.49
5.4.100.0100.06716.24
5.4.90.0100.03316.34
5.4.80.0100.07016.25
5.4.70.0100.06316.26
5.4.60.0030.03716.27
5.4.50.0100.06716.40
5.4.40.0070.02716.48
5.4.30.0100.06716.25
5.4.20.0170.07016.42
5.4.10.0100.07016.20
5.4.00.0070.06015.82
5.3.290.0100.07714.54
5.3.280.0030.04714.46
5.3.270.0000.03714.57
5.3.260.0030.03714.59
5.3.250.0030.03714.47
5.3.240.0100.05714.63
5.3.230.0000.08014.61
5.3.220.0100.07714.46
5.3.210.0100.07014.42
5.3.200.0030.03714.54
5.3.190.0030.05714.45
5.3.180.0070.06314.46
5.3.170.0070.05314.41
5.3.160.0100.07014.46
5.3.150.0000.03314.55
5.3.140.0000.04314.54
5.3.130.0000.03714.52
5.3.120.0070.05714.54
5.3.110.0070.03014.42
5.3.100.0000.04014.04
5.3.90.0030.07314.00
5.3.80.0100.06314.04
5.3.70.0130.05314.04
5.3.60.0200.05713.94
5.3.50.0030.04713.98
5.3.40.0070.03313.95
5.3.30.0070.02713.93
5.3.20.0100.02713.68
5.3.10.0030.05313.70
5.3.00.0000.06013.63
5.2.170.0000.03711.02
5.2.160.0100.02711.16
5.2.150.0030.06711.16
5.2.140.0070.04711.12
5.2.130.0030.03011.11
5.2.120.0100.04711.13
5.2.110.0070.05711.12
5.2.100.0000.05711.16
5.2.90.0030.03710.98
5.2.80.0070.05711.11
5.2.70.0070.03011.12
5.2.60.0070.05710.91
5.2.50.0100.06710.86
5.2.40.0070.06010.97
5.2.30.0030.02710.93
5.2.20.0100.05710.83
5.2.10.0000.04010.97
5.2.00.0070.02310.83
5.1.60.0070.05010.29
5.1.50.0030.02310.29
5.1.40.0030.04010.29
5.1.30.0070.03710.45
5.1.20.0000.03010.44
5.1.10.0030.02010.29
5.1.00.0070.05310.29
5.0.50.0030.02710.29
5.0.40.0000.02710.29
5.0.30.0030.05010.29
5.0.20.0000.03010.29
5.0.10.0030.04310.29
5.0.00.0030.06010.29
4.4.90.0000.01710.29
4.4.80.0070.01010.29
4.4.70.0030.02710.29
4.4.60.0000.02310.29
4.4.50.0000.03310.29
4.4.40.0000.05310.29
4.4.30.0030.01710.29
4.4.20.0030.03710.29
4.4.10.0030.03010.29
4.4.00.0030.02310.29
4.3.110.0030.03710.29
4.3.100.0000.02710.29
4.3.90.0030.01710.29
4.3.80.0000.05010.29
4.3.70.0000.03710.29
4.3.60.0100.01310.29
4.3.50.0000.02710.29
4.3.40.0070.02310.29
4.3.30.0070.02310.29
4.3.20.0000.02310.29
4.3.10.0000.02710.29
4.3.00.0000.02710.29

preferences:
43.7 ms | 401 KiB | 5 Q