3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new DateTimeImmutable('2012-07-01'); $end = new DateTimeImmutable('2012-07-31'); $interval = new DateInterval('P7D'); $recurrences = 4; $periodWithRecurrences = new DatePeriod($start, $interval, $recurrences); echo "With recurrences:\n"; foreach ($periodWithRecurrences as $r) { printf("start=%s\n", $periodWithRecurrences->start->format("Y-m-d H:i:s")); printf("current=%s\n", $periodWithRecurrences->current->format("Y-m-d H:i:s")); printf("end=%s\n", $periodWithRecurrences->end ? $periodWithRecurrences->end->format("Y-m-d H:i:s") : "null"); printf("interval=%s\n", $periodWithRecurrences->interval->format("P%r%yY%mM%dDT%hH%iM%sS (%ad)")); printf("recurrences=%s\n", $periodWithRecurrences->recurrences); printf("include_start_date=%s\n", $periodWithRecurrences->include_start_date); break; } $periodWithoutRecurrences = new DatePeriod($start, $interval, $end); echo "\nWithout recurrences:\n"; foreach ($periodWithoutRecurrences as $r) { printf("start=%s\n", $periodWithoutRecurrences->start->format("Y-m-d H:i:s")); printf("current=%s\n", $periodWithoutRecurrences->current->format("Y-m-d H:i:s")); printf("end=%s\n", $periodWithoutRecurrences->end ? $periodWithoutRecurrences->end->format("Y-m-d H:i:s") : "null"); printf("interval=%s\n", $periodWithoutRecurrences->interval->format("P%r%yY%mM%dDT%hH%iM%sS (%ad)")); printf("recurrences=%s\n", $periodWithoutRecurrences->recurrences); printf("include_start_date=%s\n", $periodWithoutRecurrences->include_start_date); break; }

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.0040.01818.68
8.3.50.0110.00416.42
8.3.40.0100.01319.27
8.3.30.0150.00019.09
8.3.20.0000.00820.34
8.3.10.0040.00421.92
8.3.00.0000.00820.95
8.2.180.0140.00718.41
8.2.170.0040.01122.96
8.2.160.0070.00719.53
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0090.00021.00
8.2.110.0060.00319.30
8.2.100.0080.00418.09
8.2.90.0060.00319.21
8.2.80.0050.00318.05
8.2.70.0000.00817.88
8.2.60.0040.00419.29
8.2.50.0070.00018.22
8.2.40.0000.00720.50
8.2.30.0040.00419.37
8.2.20.0040.00418.25
8.2.10.0040.00418.25
8.2.00.0070.00018.17
8.1.280.0070.01125.92
8.1.270.0040.00422.31
8.1.260.0060.00326.35
8.1.250.0050.00328.09
8.1.240.0070.00321.43
8.1.230.0000.01219.35
8.1.220.0090.00018.04
8.1.210.0000.00818.77
8.1.200.0030.00717.50
8.1.190.0040.00417.38
8.1.180.0030.00518.10
8.1.170.0050.00318.86
8.1.160.0060.00318.97
8.1.150.0040.00421.95
8.1.140.0020.00519.63
8.1.130.0070.00017.70
8.1.120.0040.00417.73
8.1.110.0000.00917.77
8.1.100.0000.00717.60
8.1.90.0040.00417.61
8.1.80.0040.00417.73
8.1.70.0030.00317.71
8.1.60.0050.00317.66
8.1.50.0030.00617.65
8.1.40.0050.00317.70
8.1.30.0050.00317.77
8.1.20.0000.00817.80
8.1.10.0060.00317.65
8.1.00.0070.00017.78
8.0.300.0040.00418.77
8.0.290.0000.00717.00
8.0.280.0030.00518.44
8.0.270.0030.00317.29
8.0.260.0030.00316.99
8.0.250.0080.00017.24
8.0.240.0060.00317.21
8.0.230.0050.00417.13
8.0.220.0000.00717.21
8.0.210.0000.00817.08
8.0.200.0070.00017.22
8.0.190.0080.00017.20
8.0.180.0000.00717.17
8.0.170.0040.00417.20
8.0.160.0040.00417.14
8.0.150.0050.00217.15
8.0.140.0140.00017.12
8.0.130.0060.00013.42
8.0.120.0070.00016.93
8.0.110.0050.00217.13
8.0.100.0070.00016.94
8.0.90.0000.00716.97
8.0.80.0030.01217.09
8.0.70.0070.00017.01
8.0.60.0000.00717.02
8.0.50.0040.00417.10
8.0.30.0110.00717.32
8.0.20.0120.00917.41
8.0.10.0000.00817.26
8.0.00.0090.01216.95
7.4.330.0050.00015.55
7.4.320.0030.00316.63
7.4.300.0030.00316.78
7.4.290.0070.00416.76
7.4.280.0080.00016.67
7.4.270.0080.00016.75
7.4.260.0000.00716.72
7.4.250.0070.00016.61
7.4.240.0000.00716.79
7.4.230.0030.00316.52
7.4.220.0070.01116.70
7.4.210.0140.00616.88
7.4.200.0000.00716.88
7.4.160.0100.00616.72
7.4.150.0100.00717.40
7.4.140.0090.00817.86
7.4.130.0090.00916.85
7.4.120.0060.01516.66
7.4.110.0100.00716.53
7.4.100.0090.01216.73
7.4.90.0090.00916.79
7.4.80.0070.01419.39
7.4.70.0120.00916.73
7.4.60.0150.00516.64
7.4.50.0030.01316.55
7.4.40.0090.00916.84
7.4.30.0100.01316.61
7.4.00.0080.00915.18
7.3.330.0000.00513.29
7.3.320.0030.00313.35
7.3.310.0000.00816.37
7.3.300.0030.00316.47
7.3.290.0060.01016.47
7.3.280.0080.00916.43
7.3.270.0150.01817.40
7.3.260.0020.01816.64
7.3.250.0090.01116.51
7.3.240.0070.01116.58
7.3.230.0080.00816.72
7.3.210.0080.01216.62
7.3.200.0000.01616.54
7.3.190.0090.00916.48
7.3.180.0080.00816.74
7.3.170.0030.01316.59
7.3.160.0110.01116.83
7.3.120.0090.00915.00
7.3.110.0050.01114.96
7.3.100.0080.00815.10
7.3.90.0110.00515.12
7.3.80.0030.00915.00
7.3.70.0050.00914.93
7.3.60.0020.01215.00
7.3.50.0100.00515.04
7.3.40.0070.00715.02
7.3.30.0050.00714.93
7.3.20.0080.00516.93
7.3.10.0040.00816.68
7.3.00.0030.01016.67
7.2.330.0090.00917.02
7.2.320.0110.00517.00
7.2.310.0130.01017.04
7.2.300.0070.01116.80
7.2.290.0080.00816.75
7.2.250.0070.00915.22
7.2.240.0070.01215.12
7.2.230.0030.01415.34
7.2.220.0050.01215.39
7.2.210.0020.01215.10
7.2.200.0050.00715.27
7.2.190.0040.01215.20
7.2.180.0040.01315.12
7.2.170.0060.00815.04
7.2.60.0040.00816.95
7.1.330.0020.01115.78
7.1.320.0060.01015.86
7.1.310.0050.00715.86
7.1.300.0080.00516.11
7.1.290.0080.00815.99
7.1.280.0050.00715.95
7.1.270.0050.01015.92
7.1.260.0020.00815.87
7.1.200.0030.00915.96
7.1.80.3110.01016.46
7.1.70.2720.01015.49
7.1.60.3090.01033.33
7.1.50.2410.01733.21
7.1.40.2790.01032.93
7.1.30.2250.01632.79
7.1.20.2640.01532.66
7.1.10.2520.00914.97
7.1.00.2100.01215.10
7.0.200.2860.01015.10
7.0.190.2250.00614.89
7.0.180.2370.01014.31
7.0.170.2050.01714.59
7.0.160.2270.01014.55
7.0.150.2390.00914.60
7.0.140.2160.01314.65
7.0.130.2130.01214.86
7.0.120.1780.01314.96
7.0.110.2600.01014.66
7.0.100.2220.01014.96
7.0.90.2240.01314.66
7.0.80.2010.00614.83
7.0.70.1730.00714.70
7.0.60.1710.00914.70
7.0.50.1800.01314.82
7.0.40.1720.01314.79
7.0.30.2160.01014.86
7.0.20.2180.01314.79
7.0.10.1850.00714.86
7.0.00.2000.01014.73

preferences:
47.83 ms | 400 KiB | 5 Q