3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isWeekend($date) { return $date->format('N') >= 6; } $periodStartDate = new \DateTime('today'); $periodStartDate = $periodStartDate->modify('-5 days'); $periodEndDate = new \DateTime('today'); $periodEndDate->modify('+1 day'); $period = new \DatePeriod($periodStartDate, \DateInterval::createFromDateString('1 day'), $periodEndDate); foreach ($period as $date) { echo $date->format('Y-m-d'); echo('<br>'); //if ($this->getDayOffInDaysOffByDate($daysOff, $date) || $this->isWeekend($date)) { // $daysCount--; //} }

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.0070.02116.63
8.3.50.0090.00616.84
8.3.40.0040.01118.85
8.3.30.0040.01118.78
8.3.20.0080.00019.14
8.3.10.0040.00421.73
8.3.00.0040.00419.66
8.2.180.0140.00717.13
8.2.170.0060.00922.96
8.2.160.0070.00720.53
8.2.150.0000.00824.18
8.2.140.0030.00624.66
8.2.130.0040.00420.70
8.2.120.0000.00726.35
8.2.110.0100.00021.03
8.2.100.0000.01118.16
8.2.90.0050.00319.30
8.2.80.0060.00318.05
8.2.70.0040.00417.88
8.2.60.0040.00418.16
8.2.50.0060.00318.10
8.2.40.0030.00622.36
8.2.30.0070.00021.10
8.2.20.0030.00618.14
8.2.10.0000.00818.16
8.2.00.0070.00018.14
8.1.280.0090.00625.92
8.1.270.0050.00323.95
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0090.00321.05
8.1.230.0090.00317.70
8.1.220.0080.00017.78
8.1.210.0030.00618.77
8.1.200.0030.00617.61
8.1.190.0000.00817.60
8.1.180.0030.00518.10
8.1.170.0080.00018.81
8.1.160.0000.00719.16
8.1.150.0040.00420.79
8.1.140.0030.00719.72
8.1.130.0040.00419.06
8.1.120.0040.00417.74
8.1.110.0000.00717.69
8.1.100.0000.00717.64
8.1.90.0000.01117.61
8.1.80.0050.00317.75
8.1.70.0000.00817.75
8.1.60.0030.00617.79
8.1.50.0000.00817.73
8.1.40.0080.00017.63
8.1.30.0000.00817.81
8.1.20.0080.00017.88
8.1.10.0000.00817.80
8.1.00.0040.00417.75
8.0.300.0030.00618.77
8.0.290.0040.00416.75
8.0.280.0080.00018.59
8.0.270.0030.00317.41
8.0.260.0050.00317.15
8.0.250.0040.00417.27
8.0.240.0040.00417.08
8.0.230.0030.00317.23
8.0.220.0030.00317.05
8.0.210.0000.00717.22
8.0.200.0030.00317.09
8.0.190.0040.00417.25
8.0.180.0000.00717.02
8.0.170.0000.00717.11
8.0.160.0000.00817.24
8.0.150.0040.00417.13
8.0.140.0000.00717.12
8.0.130.0000.00513.50
8.0.120.0020.00517.04
8.0.110.0030.00317.21
8.0.100.0020.00517.23
8.0.90.0000.00817.03
8.0.80.0070.01017.21
8.0.70.0040.00416.94
8.0.60.0050.00317.23
8.0.50.0040.00416.94
8.0.30.0120.00717.29
8.0.20.0110.00917.43
8.0.10.0080.00017.23
8.0.00.0110.00717.06
7.4.330.0000.00615.55
7.4.320.0000.00816.72
7.4.300.0030.00316.72
7.4.290.0040.00416.64
7.4.280.0050.00316.71
7.4.270.0030.00316.89
7.4.260.0030.00513.45
7.4.250.0070.00016.78
7.4.240.0070.00016.79
7.4.230.0000.00816.79
7.4.220.0060.01216.81
7.4.210.0060.00916.75
7.4.200.0030.00316.59
7.4.160.0070.01216.74
7.4.150.0160.00417.40
7.4.140.0150.00817.86
7.4.130.0150.00916.70
7.4.120.0070.01216.81
7.4.110.0030.01416.48
7.4.100.0150.00316.78
7.4.90.0110.00616.70
7.4.80.0120.00419.39
7.4.70.0140.00416.76
7.4.60.0130.00416.52
7.4.50.0070.00716.78
7.4.40.0130.00316.71
7.4.30.0060.00916.93
7.4.10.0050.01415.21
7.4.00.0080.01015.18
7.3.330.0040.00413.36
7.3.320.0050.00013.38
7.3.310.0060.00416.53
7.3.300.0030.00316.31
7.3.290.0090.00916.45
7.3.280.0090.00816.50
7.3.270.0120.00617.40
7.3.260.0070.01016.67
7.3.250.0080.00916.65
7.3.240.0120.00816.63
7.3.230.0140.00516.64
7.3.210.0120.00416.76
7.3.200.0090.00616.78
7.3.190.0080.00816.49
7.3.180.0110.00516.75
7.3.170.0080.00816.93
7.3.160.0120.00316.73
7.3.130.0060.01115.28
7.3.120.0070.01215.17
7.3.110.0070.01215.03
7.3.100.0100.00514.86
7.3.90.0100.01014.91
7.3.80.0050.01214.96
7.3.70.0060.01014.95
7.3.60.0090.00514.99
7.3.50.0050.00915.01
7.3.40.0050.00914.97
7.3.30.0050.00714.92
7.3.20.0060.00616.84
7.3.10.0070.00816.89
7.3.00.0080.00716.80
7.2.330.0070.01116.98
7.2.320.0120.01217.05
7.2.310.0120.00616.98
7.2.300.0100.00617.02
7.2.290.0120.01217.04
7.2.260.0090.00915.39
7.2.250.0090.00815.26
7.2.240.0070.00715.15
7.2.230.0110.00515.15
7.2.220.0100.00815.55
7.2.210.0060.01015.20
7.2.200.0100.00615.48
7.2.190.0070.00715.24
7.2.180.0070.00715.48
7.2.170.0060.00815.41
7.2.160.0050.00715.37
7.2.150.0090.00617.13
7.2.140.0080.00317.16
7.2.130.0070.01117.20
7.2.120.0050.00917.16
7.2.110.0070.00717.14
7.2.100.0070.00916.92
7.2.90.0020.01317.21
7.2.80.0070.00717.21
7.2.70.0020.01417.21
7.2.60.0080.00617.13
7.2.50.0100.00317.07
7.2.40.0050.00917.27
7.2.30.0060.00617.27
7.2.20.0060.00817.13
7.2.10.0090.00717.22
7.2.00.0050.00817.94
7.1.330.0100.00615.93
7.1.320.0100.00915.97
7.1.310.0080.00815.90
7.1.300.0060.00715.95
7.1.290.0050.00916.05
7.1.280.0060.00816.04
7.1.270.0060.00815.73
7.1.260.0050.00815.95
7.1.250.0050.01015.87
7.1.240.0070.00515.77
7.1.230.0020.01116.07
7.1.220.0060.00816.06
7.1.210.0090.00315.93
7.1.200.0050.00515.82
7.1.190.0030.01215.91
7.1.180.0020.01015.95
7.1.170.0050.00816.05
7.1.160.0040.00715.87
7.1.150.0050.01016.08
7.1.140.0060.00615.77
7.1.130.0070.00615.86
7.1.120.0020.00815.99
7.1.110.0050.01116.04
7.1.100.0070.00316.85
7.1.90.0050.00716.04
7.1.80.0020.01115.86
7.1.70.0030.00616.34
7.1.60.0550.00921.84
7.1.50.0500.01321.71
7.1.40.0470.00621.46
7.1.30.0680.00921.51
7.1.20.0490.01121.58
7.1.10.0430.00915.63
7.1.00.0400.00815.59
7.0.330.0110.00515.47
7.0.320.0040.00715.67
7.0.310.0030.01115.64
7.0.300.0060.00415.67
7.0.290.0060.00915.43
7.0.280.0080.00615.49
7.0.270.0030.00915.30
7.0.260.0080.00515.54
7.0.250.0050.00715.55
7.0.240.0060.00515.67
7.0.230.0030.00815.46
7.0.220.0030.00515.52
7.0.210.0080.00315.72
7.0.200.0560.00915.47
7.0.190.0610.00715.40
7.0.180.0460.00815.19
7.0.170.0660.00715.34
7.0.160.0600.01015.29
7.0.150.0370.00715.26
7.0.140.0340.00915.22
7.0.130.0370.00815.29
7.0.120.0410.00715.36
7.0.110.0360.00715.23
7.0.100.0400.00715.30
7.0.90.0370.01015.26
7.0.80.0410.00915.18
7.0.70.0480.00715.30
7.0.60.0440.00415.14
7.0.50.0370.00915.28
7.0.40.0380.00413.98
7.0.30.0350.00614.19
7.0.20.0410.00813.84
7.0.10.0380.00714.04
7.0.00.0350.00914.01
5.6.400.0020.01314.59
5.6.390.0060.01114.43
5.6.380.0000.01114.56
5.6.370.0090.00714.54
5.6.360.0040.00614.56
5.6.350.0120.00514.28
5.6.340.0040.00914.45
5.6.330.0040.01014.46
5.6.320.0050.01014.24
5.6.310.0100.00514.59
5.6.300.0060.00314.51
5.6.290.0090.00414.45
5.6.280.0050.01014.47
5.6.270.0050.01014.65
5.6.260.0100.00314.51
5.6.250.0010.00814.38
5.6.240.0050.00914.32
5.6.230.0060.00514.53
5.6.220.0070.00414.40
5.6.210.0080.00514.25
5.6.200.0020.01014.42
5.6.190.0100.00514.59
5.6.180.0040.00614.44
5.6.170.0060.00614.36
5.6.160.0030.00914.42
5.6.150.0070.00714.33
5.6.140.0050.00914.54
5.6.130.0120.00314.42
5.6.120.0030.00814.44
5.6.110.0060.00414.47
5.6.100.0040.00914.38
5.6.90.0060.00614.46
5.6.80.0050.01014.37
5.6.70.0070.01014.17
5.6.60.0050.00714.40
5.6.50.0040.00914.33
5.6.40.0060.00914.26
5.6.30.0070.00714.42
5.6.20.0100.00314.43
5.6.10.0020.01114.29
5.6.00.0080.00414.40

preferences:
48.72 ms | 401 KiB | 5 Q