3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dates = [ '2021-07-05', '2021-07-06', '2021-07-07', '2021-07-08', '2021-07-09', '2021-07-10', '2021-07-11', '2021-07-12', '2021-07-13', '2021-07-14', '2021-07-15', '2021-07-16', '2021-07-17', '2021-07-18', '2021-07-19', '2021-07-20', '2021-07-21', '2021-07-22', ]; $from = $dates[0]; $to = $from; $result = []; foreach($dates as $date) { if (strtotime($from) + 60 * 60 * 24 * 6 < strtotime($date)) { $result[] = ['from' => $from, 'to' => $to]; $from = $to; } $to = $date; } $result[] = ['from' => $from, 'to' => $to]; print_r($result);

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.0160.00016.50
8.3.50.0140.00718.41
8.3.40.0120.00418.90
8.3.30.0040.01118.84
8.3.20.0020.00524.18
8.3.10.0080.00024.66
8.3.00.0050.00226.16
8.2.180.0040.01125.92
8.2.170.0120.00319.26
8.2.160.0090.00622.96
8.2.150.0000.00825.66
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0000.00726.16
8.2.110.0040.00420.52
8.2.100.0110.00017.97
8.2.90.0060.00319.10
8.2.80.0050.00317.97
8.2.70.0000.00817.63
8.2.60.0050.00317.93
8.2.50.0030.00518.07
8.2.40.0040.00418.34
8.2.30.0050.00218.18
8.2.20.0050.00318.17
8.2.10.0050.00219.37
8.2.00.0000.00719.42
8.1.280.0070.01325.92
8.1.270.0040.00423.99
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0030.00619.39
8.1.230.0070.00320.92
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0000.00817.47
8.1.190.0030.00517.35
8.1.180.0030.00618.10
8.1.170.0080.00018.90
8.1.160.0040.00418.86
8.1.150.0000.00818.91
8.1.140.0000.00718.98
8.1.130.0000.00820.23
8.1.120.0040.00417.58
8.1.110.0030.00517.70
8.1.100.0080.00017.66
8.1.90.0040.00417.66
8.1.80.0000.00717.66
8.1.70.0000.00717.53
8.1.60.0030.00617.48
8.1.50.0060.00317.60
8.1.40.0050.00217.53
8.1.30.0060.00317.77
8.1.20.0080.00017.63
8.1.10.0030.00517.68
8.1.00.0000.00717.67
8.0.300.0060.00318.77
8.0.290.0050.00216.88
8.0.280.0000.00718.43
8.0.270.0050.00318.08
8.0.260.0060.00018.55
8.0.250.0030.00317.14
8.0.240.0030.00517.22
8.0.230.0070.00017.14
8.0.220.0030.00317.03
8.0.210.0000.00716.94
8.0.200.0000.00717.14
8.0.190.0080.00017.15
8.0.180.0040.00417.16
8.0.170.0030.00617.10
8.0.160.0040.00417.07
8.0.150.0050.00317.00
8.0.140.0030.00317.09
8.0.130.0070.00713.44
8.0.120.0030.00517.05
8.0.110.0040.00417.07
8.0.100.0030.00317.14
8.0.90.0050.00316.99
8.0.80.0030.01317.10
8.0.70.0040.01817.09
8.0.60.0100.01016.95
8.0.50.0090.01216.92
8.0.30.0120.00917.11
8.0.20.0110.01117.10
8.0.10.0100.00717.20
8.0.00.0120.00917.17
7.4.330.0030.00316.82
7.4.320.0030.00316.77
7.4.300.0030.00316.63
7.4.290.0040.00416.60
7.4.280.0040.00416.65
7.4.270.0000.00716.54
7.4.260.0000.00513.29
7.4.250.0070.00016.74
7.4.240.0020.00616.61
7.4.230.0030.00316.76
7.4.220.0030.00516.53
7.4.210.0030.01316.66
7.4.200.0090.01316.52
7.4.190.0060.01116.85
7.4.180.0070.01016.81
7.4.160.0030.01416.61
7.4.150.0160.00616.73
7.4.140.0150.00616.64
7.4.130.0030.01316.54
7.4.120.0000.01616.54
7.4.110.0100.01016.58
7.4.100.0070.01416.69
7.4.90.0150.00316.60
7.4.80.0060.01516.46
7.4.70.0090.01016.52
7.4.60.0030.01416.40
7.4.50.0060.00916.61
7.4.40.0030.01716.46
7.4.30.0000.01516.50
7.4.20.0040.01416.52
7.4.10.0090.00616.50
7.4.00.0090.00916.64
7.3.330.0030.00516.50
7.3.320.0000.00613.32
7.3.310.0000.00716.54
7.3.300.0030.00316.39
7.3.290.0140.00316.53
7.3.280.0170.00316.44
7.3.270.0030.01516.60
7.3.260.0100.00716.52
7.3.250.0040.01116.47
7.3.240.0100.01116.47
7.3.230.0090.01216.45
7.3.220.0080.00816.32
7.3.210.0050.01016.48
7.3.200.0100.01016.48
7.3.190.0130.00616.44
7.3.180.0130.00716.46
7.3.170.0060.00916.45
7.3.160.0140.00316.38
7.3.150.0090.00616.39
7.3.140.0040.01216.37
7.3.130.0030.01316.40
7.3.120.0070.01616.48
7.3.110.0100.01316.31
7.3.100.0060.01016.36
7.3.90.0070.01616.71
7.3.80.0100.01016.36
7.3.70.0090.01216.47
7.3.60.0000.01616.56
7.3.50.0140.00716.54
7.3.40.0130.00616.62
7.3.30.0070.01416.55
7.3.20.0030.01716.51
7.3.10.0060.00916.46
7.3.00.0100.01016.46

preferences:
60.65 ms | 400 KiB | 5 Q