3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new DateTime('2017-05-23'); $end = new DateTime('2017-06-21'); $dates = every_two_weeks($start, $end, ['tue', 'wed', 'sat']); foreach ($dates as $date) { echo $date->format('Y-m-d D').PHP_EOL; } function every_two_weeks($start, $end, $days) { $dates = []; $mon = new DateTime('mon this week '.$start->format('Y-m-d')); while ($mon <= $end) { $of = 'this week '.$mon->format('Y-m-d'); foreach ($days as $day) { $date = new DateTime("$day $of"); if ($date < $start) { continue; } if ($date > $end) { break 2; } $dates[] = $date; } $mon->add(new DateInterval('P2W')); } return $dates; }

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.120.0060.01318.97
8.3.110.0060.00320.94
8.3.100.0130.00316.63
8.3.90.0110.00418.68
8.3.80.0110.00018.43
8.3.70.0100.01317.00
8.3.60.0040.01218.80
8.3.50.0120.00316.57
8.3.40.0100.00619.10
8.3.30.0120.00318.95
8.3.20.0040.00421.54
8.3.10.0050.00321.82
8.3.00.0040.00419.69
8.2.240.0060.00318.96
8.2.230.0060.00322.58
8.2.220.0080.00024.06
8.2.210.0120.00626.77
8.2.200.0090.00016.88
8.2.190.0190.00016.75
8.2.180.0090.01216.88
8.2.170.0150.00022.96
8.2.160.0070.01019.50
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0080.00021.12
8.2.110.0030.00821.28
8.2.100.0120.00018.16
8.2.90.0000.00919.47
8.2.80.0040.00418.00
8.2.70.0030.00617.88
8.2.60.0100.00018.18
8.2.50.0000.00818.10
8.2.40.0000.00720.58
8.2.30.0070.00019.37
8.2.20.0050.00318.32
8.2.10.0040.00418.17
8.2.00.0000.00818.34
8.1.300.0080.00018.02
8.1.290.0030.00618.88
8.1.280.0180.00425.92
8.1.270.0000.00823.86
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0060.00323.97
8.1.230.0040.00717.89
8.1.220.0030.00517.88
8.1.210.0050.00318.77
8.1.200.0030.00617.60
8.1.190.0000.00817.36
8.1.180.0060.00618.10
8.1.170.0080.00018.58
8.1.160.0040.00419.04
8.1.150.0040.00420.12
8.1.140.0040.00419.68
8.1.130.0030.00320.21
8.1.120.0050.00217.75
8.1.110.0040.00417.60
8.1.100.0040.00417.74
8.1.90.0000.00817.75
8.1.80.0000.00717.71
8.1.70.0070.00017.66
8.1.60.0060.00317.67
8.1.50.0040.00417.67
8.1.40.0000.00917.75
8.1.30.0120.00017.70
8.1.20.0060.00317.83
8.1.10.0080.00217.70
8.1.00.0050.00517.64
8.0.300.0050.00318.77
8.0.290.0040.00417.00
8.0.280.0040.00418.58
8.0.270.0070.00017.42
8.0.260.0030.00618.60
8.0.250.0080.00017.08
8.0.240.0030.00317.06
8.0.230.0030.00317.21
8.0.220.0030.00317.16
8.0.210.0040.00417.07
8.0.200.0070.00317.12
8.0.190.0040.00417.22
8.0.180.0000.00717.23
8.0.170.0050.00317.17
8.0.160.0000.00717.18
8.0.150.0000.00817.00
8.0.140.0030.00517.07
8.0.130.0040.00515.32
8.0.120.0050.00517.14
8.0.110.0080.00217.12
8.0.100.0070.00317.08
8.0.90.0070.00317.16
8.0.80.0100.00617.16
8.0.70.0060.00317.21
8.0.60.0030.00517.04
8.0.50.0020.00517.15
8.0.30.0110.00517.29
8.0.20.0090.00917.36
8.0.10.0040.00417.24
8.0.00.0060.01017.11
7.4.330.0050.00015.55
7.4.320.0070.00016.71
7.4.300.0030.00316.85
7.4.290.0070.00016.75
7.4.280.0060.00316.80
7.4.270.0060.00216.84
7.4.260.0020.00516.70
7.4.250.0070.00216.72
7.4.240.0020.00616.73
7.4.230.0040.00416.74
7.4.220.0080.00516.63
7.4.210.0080.00616.79
7.4.200.0070.00216.80
7.4.190.0070.00316.63
7.4.180.0000.01016.68
7.4.160.0060.01016.71
7.4.150.0040.01116.94
7.4.140.0130.00717.58
7.4.130.0100.00516.59
7.4.120.0050.01316.66
7.4.110.0070.00716.64
7.4.100.0120.00516.82
7.4.90.0080.00716.66
7.4.80.0100.00518.00
7.4.70.0070.00716.77
7.4.60.0130.00116.72
7.4.50.0080.00716.43
7.4.40.0080.00716.62
7.4.30.0120.00216.59
7.4.20.0070.00716.61
7.4.10.0030.01016.64
7.4.00.0070.00915.76
7.3.330.0080.00514.89
7.3.320.0060.00715.10
7.3.310.0090.00516.60
7.3.300.0090.00416.45
7.3.290.0120.00216.52
7.3.280.0110.00816.54
7.3.270.0120.00617.01
7.3.260.0140.00416.64
7.3.250.0060.01216.57
7.3.240.0120.00616.68
7.3.230.0180.00216.62
7.3.220.0130.00716.44
7.3.210.0160.00216.70
7.3.200.0150.00516.53
7.3.190.0130.00516.56
7.3.180.0140.00616.61
7.3.170.0110.00716.65
7.3.160.0120.00616.51
7.3.150.0150.00416.57
7.3.140.0140.00516.44
7.3.130.0140.00616.51
7.3.120.0060.01215.77
7.3.110.0100.00815.80
7.3.100.0090.01015.85
7.3.90.0100.00715.78
7.3.80.0090.00715.81
7.3.70.0090.00615.80
7.3.60.0080.00715.92
7.3.50.0080.00515.86
7.3.40.0090.00715.83
7.3.30.0090.00415.85
7.3.20.0140.00716.72
7.3.10.0100.00816.71
7.3.00.0100.00916.67
7.2.340.0160.00316.85
7.2.330.0090.01016.88
7.2.320.0120.00816.73
7.2.310.0120.00916.90
7.2.300.0140.00716.78
7.2.290.0110.00716.69
7.2.280.0160.00316.77
7.2.270.0150.00516.70
7.2.260.0130.00716.73
7.2.250.0130.00616.08
7.2.240.0110.00715.92
7.2.230.0080.01116.02
7.2.220.0080.00716.17
7.2.210.0080.01016.05
7.2.200.0120.00715.96
7.2.190.0060.00916.01
7.2.180.0090.00616.09
7.2.170.0090.00715.97
7.2.160.0130.00416.33
7.2.150.0140.00517.06
7.2.140.0110.00916.87
7.2.130.0130.00416.98
7.2.120.0090.01016.92
7.2.110.0090.00817.02
7.2.100.0120.00616.99
7.2.90.0150.00616.90
7.2.80.0100.00816.97
7.2.70.0100.00916.93
7.2.60.0100.00817.06
7.2.50.0090.00916.96
7.2.40.0070.01117.10
7.2.30.0080.01216.99
7.2.20.0100.01017.01
7.2.10.0160.00417.06
7.2.00.0080.01017.00
7.1.330.0110.00815.74
7.1.320.0060.01115.84
7.1.310.0090.00715.78
7.1.300.0110.00615.82
7.1.290.0090.00715.71
7.1.280.0100.00615.78
7.1.270.0090.00515.80
7.1.260.0110.00615.87
7.1.250.0110.00815.73
7.1.240.0090.00915.73
7.1.230.0150.00315.72
7.1.220.0090.00615.84
7.1.210.0100.00715.82
7.1.200.0080.00715.86
7.1.190.0080.00815.70
7.1.180.0090.00815.67
7.1.170.0100.01015.79
7.1.160.0120.00415.70
7.1.150.0120.00715.84
7.1.140.0130.00515.71
7.1.130.0100.00915.62
7.1.120.0100.01115.73
7.1.110.0090.00915.81
7.1.100.0080.00715.83
7.1.90.0050.01115.79
7.1.80.0070.00815.77
7.1.70.0100.00816.70
7.1.60.0110.00516.70
7.1.50.0130.00720.95
7.1.40.0140.00621.03
7.1.30.0100.00720.93
7.1.20.0090.01120.97
7.1.10.0100.00416.48
7.1.00.0110.00616.42
7.0.330.0100.00515.79
7.0.320.0120.00415.95
7.0.310.0140.00315.97
7.0.300.0070.00915.96
7.0.290.0080.00915.98
7.0.280.0080.00915.97
7.0.270.0110.00415.99
7.0.260.0070.00915.98
7.0.250.0110.00516.03
7.0.240.0110.00716.02
7.0.230.0110.00616.01
7.0.220.0110.00716.04
7.0.210.0130.00716.07
7.0.200.0080.00816.29
7.0.190.0070.00916.18
7.0.180.0100.00716.16
7.0.170.0090.00616.17
7.0.160.0090.00716.06
7.0.150.0080.01015.97
7.0.140.0090.00816.12
7.0.130.0060.01116.24
7.0.120.0100.00616.13
7.0.110.0090.00516.17
7.0.100.0070.00916.06
7.0.90.0120.00616.11
7.0.80.0100.00716.06
7.0.70.0070.00716.10
7.0.60.0110.00516.02
7.0.50.0120.00816.09
7.0.40.0100.00715.74
7.0.30.0090.00715.60
7.0.20.0070.00915.72
7.0.10.0080.00815.62
7.0.00.0080.00815.62
5.6.400.0090.00815.45
5.6.390.0110.00615.66
5.6.380.0110.00715.51
5.6.370.0110.00615.52
5.6.360.0110.00615.50
5.6.350.0080.00915.52
5.6.340.0090.00715.43
5.6.330.0150.00415.45
5.6.320.0090.00715.29
5.6.310.0080.00815.58
5.6.300.0120.00915.32
5.6.290.0130.00715.45
5.6.280.0140.00715.46
5.6.270.0090.00915.54
5.6.260.0120.00715.58
5.6.250.0080.00915.70
5.6.240.0130.00515.46
5.6.230.0080.00915.62
5.6.220.0130.00615.47
5.6.210.0080.01015.54
5.6.200.0090.00915.68
5.6.190.0130.00615.65
5.6.180.0060.01215.51
5.6.170.0070.01215.64
5.6.160.0110.00415.69
5.6.150.0100.00815.61
5.6.140.0080.01115.63
5.6.130.0100.00615.64
5.6.120.0100.00715.56
5.6.110.0110.00515.60
5.6.100.0120.00615.48
5.6.90.0080.00815.60
5.6.80.0090.00915.44
5.6.70.0070.00915.58
5.6.60.0090.00815.46
5.6.50.0090.00915.58
5.6.40.0070.01015.54
5.6.30.0130.00315.56
5.6.20.0150.00315.54
5.6.10.0120.00715.52
5.6.00.0100.00815.56

preferences:
29.89 ms | 403 KiB | 5 Q