3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getPlayDays($startWeek, $numWeeks) { $numWeeks --; $result = []; $currYear = (int)(new \DateTime())->format('Y'); $oneDay = new \DateInterval('P1D'); // Start on the first Thursday of the given week. $startDate = (new \DateTime())->setISODate($currYear, $startWeek, 4); $endDate = clone $startDate; $endDate->add(new \DateInterval("P{$numWeeks}W")); // End on the Sunday of the last week. $endDate->setISODate((int)$endDate->format('o'), (int)$endDate->format('W'), 7); $period = new \DatePeriod($startDate, $oneDay, $endDate->add($oneDay)); foreach($period as $day){ if(7 === (int)$day->format('N') ){ $result[] = $day; } } return $result; } foreach(getPlayDays(1, 3) as $playDay){ var_dump($playDay->format('D m-d-Y')); }

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.00718.68
8.3.50.0090.01121.32
8.3.40.0140.00018.92
8.3.30.0110.00419.21
8.3.20.0040.00420.34
8.3.10.0040.00423.63
8.3.00.0060.00319.76
8.2.180.0120.00918.41
8.2.170.0120.00622.96
8.2.160.0110.00420.37
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0050.00226.16
8.2.120.0000.00722.04
8.2.110.0080.00420.64
8.2.100.0120.00018.07
8.2.90.0030.00519.22
8.2.80.0000.00817.97
8.2.70.0030.00617.50
8.2.60.0030.00618.18
8.2.50.0030.00618.07
8.2.40.0040.00418.34
8.2.30.0050.00318.10
8.2.20.0080.00018.05
8.2.10.0040.00418.18
8.2.00.0030.00517.84
8.1.280.0000.01525.92
8.1.270.0000.00923.96
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0000.00922.13
8.1.230.0080.00320.97
8.1.220.0040.00417.77
8.1.210.0000.00818.77
8.1.200.0040.00417.38
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0040.00420.56
8.1.160.0040.00422.04
8.1.150.0070.00019.04
8.1.140.0020.00517.54
8.1.130.0030.00317.83
8.1.120.0000.00717.70
8.1.110.0000.00817.68
8.1.100.0000.00717.60
8.1.90.0030.00517.57
8.1.80.0000.00717.65
8.1.70.0000.00717.55
8.1.60.0030.00617.81
8.1.50.0080.00017.68
8.1.40.0040.00417.63
8.1.30.0080.00017.70
8.1.20.0080.00017.80
8.1.10.0000.00817.74
8.1.00.0000.00817.74
8.0.300.0070.00018.77
8.0.290.0040.00417.00
8.0.280.0070.00018.48
8.0.270.0000.00717.27
8.0.260.0060.00017.36
8.0.250.0060.00017.08
8.0.240.0030.00317.12
8.0.230.0050.00217.16
8.0.220.0070.00017.11
8.0.210.0040.00317.09
8.0.200.0030.00317.14
8.0.190.0000.00717.16
8.0.180.0040.00417.13
8.0.170.0050.00217.13
8.0.160.0030.00317.02
8.0.150.0000.00817.03
8.0.140.0040.00417.14
8.0.130.0000.00613.50
8.0.120.0040.00417.08
8.0.110.0050.00317.05
8.0.100.0040.00416.93
8.0.90.0070.00017.18
8.0.80.0100.01217.06
8.0.70.0040.00416.99
8.0.60.0040.00417.14
8.0.50.0080.00017.17
8.0.30.0140.00517.18
8.0.20.0140.00817.40
8.0.10.0050.00317.20
8.0.00.0080.00816.93
7.4.330.0030.00315.02
7.4.320.0030.00316.66
7.4.300.0070.00016.58
7.4.290.0000.00716.68
7.4.280.0000.00816.68
7.4.270.0030.00316.75
7.4.260.0030.00316.55
7.4.250.0030.00316.62
7.4.240.0020.00516.80
7.4.230.0070.00016.55
7.4.220.0100.01016.69
7.4.210.0040.01116.78
7.4.200.0000.00716.58
7.4.160.0140.00716.86
7.4.150.0060.01217.40
7.4.140.0120.00717.86
7.4.130.0120.00816.60
7.4.120.0090.00816.72
7.4.110.0100.01316.64
7.4.100.0120.01216.76
7.4.90.0100.00716.50
7.4.80.0090.01219.39
7.4.70.0060.01216.68
7.4.60.0150.00416.67
7.4.50.0040.00416.65
7.4.40.0030.01316.86
7.4.30.0090.01216.58
7.4.00.0070.00615.21
7.3.330.0040.00413.53
7.3.320.0050.00013.52
7.3.310.0070.00016.55
7.3.300.0000.00716.48
7.3.290.0070.00816.50
7.3.280.0080.00816.54
7.3.270.0160.00317.40
7.3.260.0040.01416.66
7.3.250.0050.01416.54
7.3.240.0030.01616.68
7.3.230.0070.01016.68
7.3.210.0090.00616.71
7.3.200.0070.01419.39
7.3.190.0150.00816.50
7.3.180.0120.00316.45
7.3.170.0040.01216.55
7.3.160.0060.00916.65
7.3.120.0050.00714.92
7.3.110.0050.01014.96
7.3.100.0050.01014.99
7.3.90.0070.00715.01
7.3.80.0010.01215.06
7.3.70.0040.00715.03
7.3.60.0020.01015.04
7.3.50.0060.00314.92
7.3.40.0080.00414.78
7.3.30.0060.00414.78
7.3.20.0050.00516.74
7.3.10.0080.00316.69
7.3.00.0040.00716.79
7.2.330.0090.00916.75
7.2.320.0100.00717.00
7.2.310.0090.00917.01
7.2.300.0060.00917.03
7.2.290.0120.01216.87
7.2.250.0170.00315.24
7.2.240.0070.00615.35
7.2.230.0100.00415.41
7.2.220.0000.01415.42
7.2.210.0020.01015.29
7.2.200.0060.00515.16
7.2.190.0060.00915.13
7.2.180.0060.00715.24
7.2.170.0040.00915.26
7.2.160.0000.01115.34
7.2.150.0070.00316.88
7.2.140.0040.00716.88
7.2.130.0040.00716.90
7.2.120.0000.01116.94
7.2.110.0090.00317.22
7.2.100.0060.00617.00
7.2.90.0040.00717.06
7.2.80.0040.00717.20
7.2.70.0040.00717.19
7.2.60.0040.00817.24
7.2.50.0000.01117.12
7.2.40.0060.00617.14
7.2.30.0090.00317.08
7.2.20.0030.00717.02
7.2.10.0090.00317.22
7.2.00.0040.00918.51
7.1.330.0100.00215.84
7.1.320.0050.00515.96
7.1.310.0030.01015.85
7.1.300.0030.01015.83
7.1.290.0080.00515.90
7.1.280.0050.00516.01
7.1.270.0020.01016.03
7.1.260.0030.01015.98
7.1.250.0070.00316.00
7.1.200.0080.00815.79
7.1.100.0040.00418.34
7.1.70.0100.00017.53
7.1.60.0080.01519.32
7.1.50.0220.01035.08
7.1.00.0070.07322.48
7.0.200.0040.00416.99
7.0.140.0070.07022.09
7.0.60.0030.06020.00
7.0.50.0030.05317.88
7.0.40.0030.04320.13
7.0.30.0670.06320.33
7.0.20.0130.05320.24
7.0.10.0170.03320.15
7.0.00.0030.04320.06
5.6.280.0070.07321.09
5.6.210.0000.04320.57
5.6.200.0000.05318.26
5.6.190.0030.04320.55
5.6.180.0130.04320.63
5.6.170.0370.03720.50
5.6.160.0000.04320.55
5.6.150.0070.06718.27
5.6.140.0030.04718.16
5.6.130.0130.08018.15
5.6.120.0100.08721.00
5.6.110.0070.04021.00
5.6.100.0100.07020.97
5.6.90.0100.08321.14
5.6.80.0170.07320.45
5.6.70.4630.04020.29
5.5.350.0300.07020.51
5.5.340.0030.04017.96
5.5.330.0000.04320.21
5.5.320.0400.07020.42
5.5.310.0270.05320.46
5.5.300.0030.05018.05
5.5.290.0170.07717.95
5.5.280.0030.05020.79
5.5.270.0030.08720.97
5.5.260.0370.08320.80
5.5.250.0070.08020.71
5.5.240.0170.08320.27
5.4.450.0670.06019.35
5.4.440.0700.06319.61
5.4.430.0170.06019.55
5.4.420.0730.05019.39
5.4.410.0830.05019.43
5.4.400.0630.06019.02
5.4.390.0800.06019.06
5.4.380.0730.05719.13
5.4.370.0800.04718.88
5.4.360.0630.05718.98
5.4.350.0770.05719.26
5.4.340.0070.03612.03
5.4.320.0070.03512.52
5.4.310.0090.03512.51
5.4.300.0080.03812.52
5.4.290.0070.03612.51
5.4.280.0100.03812.41
5.4.270.0040.03812.41
5.4.260.0090.03512.41
5.4.250.0060.04312.41
5.4.240.0090.03812.41
5.4.230.0070.03612.40
5.4.220.0070.03312.40
5.4.210.0060.04112.40
5.4.200.0070.04712.40
5.4.190.0060.03712.39
5.4.180.0070.03612.39
5.4.170.0060.03512.40
5.4.160.0030.03812.40
5.4.150.0040.03712.39
5.4.140.0060.03612.08
5.4.130.0050.03512.06
5.4.120.0070.03512.02
5.4.110.0090.03312.02
5.4.100.0060.04112.02
5.4.90.0030.04412.02
5.4.80.0060.03512.02
5.4.70.0080.03712.01
5.4.60.0060.03412.02
5.4.50.0090.03112.02
5.4.40.0060.03812.00
5.4.30.0070.03812.00
5.4.20.0040.03612.00
5.4.10.0050.03412.00
5.4.00.0080.03611.49
5.3.290.0070.03612.80
5.3.280.0050.04312.71
5.3.270.0070.03612.72
5.3.260.0050.03812.71
5.3.250.0080.04012.71
5.3.240.0080.03912.72
5.3.230.0120.03512.71
5.3.220.0040.04412.68
5.3.210.0060.04412.68
5.3.200.0090.03612.68
5.3.190.0090.03212.68
5.3.180.0050.03612.67
5.3.170.0050.03612.67
5.3.160.0070.03412.67
5.3.150.0060.03612.67
5.3.140.0060.03512.66
5.3.130.0080.03612.66
5.3.120.0070.04212.66
5.3.110.0080.03512.66
5.3.100.0050.03712.13
5.3.90.0060.03512.11
5.3.80.0040.03812.09
5.3.70.0040.03712.09
5.3.60.0080.03312.09
5.3.50.0020.03912.02
5.3.40.0070.03812.02
5.3.30.0060.03711.98
5.3.20.0070.03611.76
5.3.10.0050.03511.74
5.3.00.0060.03411.71
5.2.170.0050.0399.21
5.2.160.0020.0309.21
5.2.150.0050.0349.21
5.2.140.0020.0339.21
5.2.130.0060.0319.17
5.2.120.0080.0339.17
5.2.110.0050.0289.18
5.2.100.0070.0259.18
5.2.90.0050.0279.18
5.2.80.0060.0279.17
5.2.70.0050.0309.18
5.2.60.0070.0279.12
5.2.50.0050.0289.09
5.2.40.0030.0309.07
5.2.30.0050.0299.05
5.2.20.0100.0289.04
5.2.10.0040.0328.95
5.2.00.0030.0308.81
5.1.60.0010.0268.09
5.1.50.0050.0238.08
5.1.40.0040.0248.06
5.1.30.0090.0218.43
5.1.20.0040.0268.44
5.1.10.0030.0268.16
5.1.00.0040.0248.16
5.0.50.0010.0236.64
5.0.40.0040.0176.51
5.0.30.0040.0296.31
5.0.20.0030.0196.29
5.0.10.0020.0206.26
5.0.00.0020.0376.25
4.4.90.0020.0174.78
4.4.80.0020.0154.75
4.4.70.0040.0134.76
4.4.60.0030.0144.75
4.4.50.0020.0154.77
4.4.40.0060.0334.71
4.4.30.0010.0164.76
4.4.20.0050.0124.85
4.4.10.0010.0164.85
4.4.00.0030.0244.76
4.3.110.0010.0174.67
4.3.100.0010.0164.67
4.3.90.0010.0164.63
4.3.80.0020.0244.59
4.3.70.0010.0164.63
4.3.60.0040.0134.63
4.3.50.0030.0154.63
4.3.40.0020.0244.54
4.3.30.0010.0163.30
4.3.20.0020.0153.28
4.3.10.0030.0143.24
4.3.00.0130.0236.99

preferences:
44.6 ms | 401 KiB | 5 Q