3v4l.org

run code in 300+ PHP versions simultaneously
<?php // In the beginning there are no Sundays counted yet $number_of_sundays = 0; // Make the following actions for all years of the twentieth century for ($current_year = 1900; $current_year <= 1999; $current_year++) { //Make the following actions for all months from January to December for ($current_month = 1; $current_month <= 12; $current_month++) { // Get Unix Timestamp of the current month and year on the first day of the month $current_date = mktime(0, 0, 0, $current_month, 01, $current_year); $get_day_of_week = date("D", $current_date); if ($get_day_of_week == "Sun") { $number_of_sundays++; echo "01.".$current_month.".".$current_year." was a Sunday!"."\n"; } } } echo $number_of_sundays;

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.0090.01216.75
8.3.50.0130.00622.12
8.3.40.0130.00318.78
8.3.30.0100.00719.09
8.3.20.0040.00420.33
8.3.10.0030.00623.48
8.3.00.0090.00021.02
8.2.180.0070.01818.11
8.2.170.0070.01422.96
8.2.160.0030.01720.45
8.2.150.0090.00024.18
8.2.140.0030.00624.66
8.2.130.0030.01326.16
8.2.120.0090.00019.48
8.2.110.0030.00722.25
8.2.100.0080.00420.46
8.2.90.0040.00819.27
8.2.80.0030.00617.97
8.2.70.0040.00817.75
8.2.60.0030.00717.93
8.2.50.0070.00418.07
8.2.40.0000.01220.07
8.2.30.0060.00318.20
8.2.20.0000.01017.81
8.2.10.0000.00818.16
8.2.00.0060.00617.76
8.1.280.0140.00725.92
8.1.270.0060.00323.97
8.1.260.0060.00326.35
8.1.250.0060.00328.09
8.1.240.0000.01023.86
8.1.230.0030.01119.09
8.1.220.0000.01017.74
8.1.210.0060.00318.77
8.1.200.0030.00617.35
8.1.190.0060.00317.35
8.1.180.0000.00918.10
8.1.170.0040.00418.73
8.1.160.0030.00621.96
8.1.150.0030.00618.70
8.1.140.0030.00617.50
8.1.130.0030.00519.69
8.1.120.0030.00717.57
8.1.110.0050.00517.65
8.1.100.0030.00617.56
8.1.90.0000.00917.43
8.1.80.0040.00417.50
8.1.70.0060.00317.58
8.1.60.0040.00717.66
8.1.50.0070.00417.55
8.1.40.0040.00717.64
8.1.30.0100.00017.71
8.1.20.0000.00917.71
8.1.10.0030.00617.61
8.1.00.0050.00517.50
8.0.300.0040.00418.77
8.0.290.0070.00416.75
8.0.280.0000.00818.44
8.0.270.0030.00617.28
8.0.260.0040.00417.34
8.0.250.0030.00517.14
8.0.240.0030.00617.09
8.0.230.0040.00416.92
8.0.220.0030.00616.93
8.0.210.0000.00916.96
8.0.200.0000.00816.96
8.0.190.0060.00317.11
8.0.180.0070.00417.05
8.0.170.0040.00716.96
8.0.160.0040.00417.10
8.0.150.0060.00316.93
8.0.140.0030.00716.91
8.0.130.0050.00313.49
8.0.120.0000.00916.98
8.0.110.0060.00317.01
8.0.100.0030.00616.84
8.0.90.0090.00017.04
8.0.80.0040.01417.04
8.0.70.0040.00417.05
8.0.60.0000.00916.86
8.0.50.0060.00317.06
8.0.30.0120.01117.35
8.0.20.0110.01517.40
8.0.10.0030.00617.03
8.0.00.0120.01016.99
7.4.330.0030.00315.08
7.4.320.0080.00016.48
7.4.300.0040.00416.50
7.4.290.0030.00616.52
7.4.280.0000.00816.58
7.4.270.0080.00016.50
7.4.260.0060.00316.70
7.4.250.0030.00616.51
7.4.240.0040.00516.65
7.4.230.0000.00916.56
7.4.220.0070.01316.67
7.4.210.0040.02116.62
7.4.200.0030.00616.41
7.4.160.0090.01816.52
7.4.150.0090.01217.40
7.4.140.0140.01317.86
7.4.130.0140.00716.58
7.4.120.0070.01416.69
7.4.110.0070.01716.57
7.4.100.0100.01016.69
7.4.90.0100.01816.61
7.4.80.0090.01619.39
7.4.70.0170.00416.56
7.4.60.0070.01316.61
7.4.50.0000.00616.70
7.4.40.0170.00316.70
7.4.30.0060.01216.80
7.4.00.0080.01114.89
7.3.330.0040.00413.13
7.3.320.0030.00313.13
7.3.310.0030.00616.16
7.3.300.0060.00316.32
7.3.290.0090.00916.45
7.3.280.0070.01516.28
7.3.270.0070.01317.40
7.3.260.0060.01516.32
7.3.250.0100.01216.63
7.3.240.0140.00716.66
7.3.230.0160.00416.74
7.3.210.0090.01216.63
7.3.200.0170.01019.39
7.3.190.0050.01616.48
7.3.180.0070.01116.63
7.3.170.0070.01216.63
7.3.160.0150.01116.54
7.3.120.0030.01514.73
7.3.110.0100.00714.82
7.3.100.0060.01214.95
7.3.90.0090.00315.07
7.3.80.0040.00714.86
7.3.70.0040.00714.79
7.3.60.0040.01115.02
7.3.50.0030.01314.94
7.3.40.0040.00714.86
7.3.30.0090.00615.05
7.3.20.0060.00916.64
7.3.10.0080.00416.73
7.3.00.0130.00016.95
7.2.330.0110.01816.93
7.2.320.0170.00417.01
7.2.310.0070.01316.76
7.2.300.0150.01216.61
7.2.290.0110.01416.54
7.2.250.0070.01415.41
7.2.240.0110.01114.86
7.2.230.0140.00415.14
7.2.220.0000.01315.10
7.2.210.0040.01215.01
7.2.200.0130.00315.25
7.2.190.0090.00314.82
7.2.180.0040.01415.11
7.2.170.0060.00614.94
7.2.00.0100.01319.82
7.1.330.0000.02115.77
7.1.320.0040.01215.99
7.1.310.0030.01515.77
7.1.300.0040.01215.83
7.1.290.0100.01015.70
7.1.280.0000.01215.92
7.1.270.0070.01016.02
7.1.260.0030.00915.52
7.1.100.0030.01318.36
7.1.70.0050.00517.27
7.1.60.0110.01419.70
7.1.50.0090.01917.11
7.1.00.0070.07722.36
7.0.200.0030.00616.97
7.0.140.0070.07322.07
7.0.90.0130.05719.98
7.0.80.0070.05020.01
7.0.70.0070.04319.89
7.0.60.0070.06319.85
7.0.50.0170.08320.20
7.0.40.0130.08320.13
7.0.30.0100.06020.11
7.0.20.0030.09020.09
7.0.10.0130.08320.07
7.0.00.0070.06020.04
5.6.280.0030.08021.09
5.6.240.0070.04720.59
5.6.230.0100.08320.68
5.6.220.0100.06320.62
5.6.210.0030.08320.64
5.6.200.0100.09021.03
5.6.190.0030.08321.02
5.6.180.0170.06320.95
5.6.170.0000.09021.03
5.6.160.0100.09020.94
5.6.150.0070.06721.04
5.6.140.0100.08321.02
5.6.130.0030.09021.00
5.6.120.0070.08721.08
5.6.110.0070.08721.05
5.6.100.0200.07020.94
5.6.90.0070.08321.00
5.6.80.0000.08320.32
5.6.70.0030.04720.48
5.6.60.0100.06720.45
5.6.50.0100.04320.48
5.6.40.0030.09020.36
5.6.30.0070.08020.31
5.6.20.0100.07720.48
5.6.10.0270.03020.45
5.6.00.0000.08020.46
5.5.380.0170.06020.39
5.5.370.0070.08320.35
5.5.360.0100.08720.41
5.5.350.0000.06320.41
5.5.340.0030.08720.86
5.5.330.0170.07720.85
5.5.320.0130.07020.79
5.5.310.0000.08720.90
5.5.300.0000.09020.89
5.5.290.0130.08320.86
5.5.280.0100.07720.83
5.5.270.0030.08020.75
5.5.260.0000.09320.88
5.5.250.0100.07020.67
5.5.240.0030.09020.18
5.5.230.0000.06720.21
5.5.220.0100.06720.13
5.5.210.0030.07320.10
5.5.200.0130.07720.28
5.5.190.0030.08320.23
5.5.180.0000.08720.17
5.5.160.0030.08720.15
5.5.150.0030.09020.26
5.5.140.0070.08320.07
5.5.130.0170.08020.18
5.5.120.0000.04320.12
5.5.110.0000.04020.21
5.5.100.0130.07720.05
5.5.90.0100.07720.06
5.5.80.0200.07320.09
5.5.70.0130.07020.14
5.5.60.0130.07720.10
5.5.50.0170.07020.09
5.5.40.0130.05020.12
5.5.30.0100.04720.13
5.5.20.0070.08020.04
5.5.10.0070.05320.11
5.5.00.0100.05020.07
5.4.450.0100.07719.43
5.4.440.0070.07019.37
5.4.430.0030.05319.46
5.4.420.0070.07719.22
5.4.410.0130.07319.27
5.4.400.0130.06019.04
5.4.390.0100.07718.88
5.4.380.0030.06318.95
5.4.370.0030.08019.06
5.4.360.0030.08319.13
5.4.350.0130.07319.07
5.4.340.0100.08018.98
5.4.320.0100.07318.81
5.4.310.0070.07719.12
5.4.300.0030.08018.98
5.4.290.0000.07719.02
5.4.280.0000.07719.14
5.4.270.0070.07019.05
5.4.260.0100.07719.14
5.4.250.0030.03718.77
5.4.240.0000.04719.11
5.4.230.0070.07719.05
5.4.220.0130.08019.05
5.4.210.0170.05719.11
5.4.200.0000.08018.97
5.4.190.0130.06319.06
5.4.180.0130.08019.01
5.4.170.0100.07019.05
5.4.160.0130.07718.90
5.4.150.0070.07719.05
5.4.140.0130.07316.34
5.4.130.0030.08016.34
5.4.120.0070.04016.17
5.4.110.0100.07316.51
5.4.100.0030.07716.33
5.4.90.0100.05016.41
5.4.80.0100.07016.34
5.4.70.0070.08016.34
5.4.60.0130.07016.24
5.4.50.0030.06716.33
5.4.40.0130.07016.24
5.4.30.0030.08316.30
5.4.20.0070.04316.26
5.4.10.0030.06016.37
5.4.00.0100.05315.73
5.3.290.0070.08014.61
5.3.280.0270.05314.55
5.3.270.0170.07714.46
5.3.260.0000.09014.58
5.3.250.0100.07314.61
5.3.240.0170.03714.51
5.3.230.0030.07314.55
5.3.220.0030.05314.55
5.3.210.0100.07014.42
5.3.200.0030.05714.50
5.3.190.0100.07314.47
5.3.180.0070.06014.54
5.3.170.0070.06714.57
5.3.160.0100.07714.51
5.3.150.0000.04714.42
5.3.140.0070.04714.56
5.3.130.0100.07314.50
5.3.120.0030.09014.54
5.3.110.0130.07314.46
5.3.100.0000.08713.87
5.3.90.0070.06714.01
5.3.80.0030.07313.98
5.3.70.0130.07014.00
5.3.60.0100.07313.78
5.3.50.0070.08013.80
5.3.40.0070.07713.80
5.3.30.0070.04313.81
5.3.20.0000.08713.67
5.3.10.0030.08313.63
5.3.00.0070.07013.40
5.2.170.0000.07312.64
5.2.160.0030.04312.64
5.2.150.0070.06712.64
5.2.140.0070.05712.64
5.2.130.0100.06312.64
5.2.120.0030.06312.64
5.2.110.0030.03712.64
5.2.100.0000.07712.64
5.2.90.0070.05712.64
5.2.80.0070.06712.64
5.2.70.0070.06012.64
5.2.60.0030.07312.64
5.2.50.0070.06312.64
5.2.40.0100.05312.64
5.2.30.0070.06012.64
5.2.20.0130.06312.64
5.2.10.0030.06312.64
5.2.00.0070.06012.64
5.1.60.0100.05312.64
5.1.50.0100.04312.64
5.1.40.0070.02712.64
5.1.30.0070.05312.64
5.1.20.0070.03712.64
5.1.10.0100.03012.64
5.1.00.0030.07312.64
5.0.50.0170.04012.64
5.0.40.0200.03712.64
5.0.30.0170.04312.64
5.0.20.0100.04712.64
5.0.10.0030.05012.64
5.0.00.0170.06312.64
4.4.90.0100.01712.64
4.4.80.0130.03712.64
4.4.70.0170.03312.64
4.4.60.0130.01712.64
4.4.50.0030.03012.64
4.4.40.0070.03012.64
4.4.30.0170.01712.64
4.4.20.0070.02012.64
4.4.10.0030.04312.64
4.4.00.0100.03012.64
4.3.110.0070.03712.64
4.3.100.0070.02012.64
4.3.90.0030.04712.64
4.3.80.0130.05312.64
4.3.70.0100.04312.64
4.3.60.0100.03012.64
4.3.50.0100.04312.64
4.3.40.0130.04712.64
4.3.30.0130.03712.64
4.3.20.0100.03012.64
4.3.10.0170.03012.64
4.3.00.0130.03312.64

preferences:
44.61 ms | 401 KiB | 5 Q