3v4l.org

run code in 300+ PHP versions simultaneously
<?php $year = date_create('today')->format('Y'); //remove comment next line for test's //$year = 2001; $dtStart = date_create('2 jan '.$year)->modify('last Monday'); $dtEnd = date_create('last monday of Dec '.$year); for($weeks = [];$dtStart <= $dtEnd;$dtStart->modify('+1 week')){ $key = $dtStart->format('W-Y'); $from = $dtStart->format('d/m/Y'); $to = (clone $dtStart)->modify('+6 Days')->format('d/m/Y'); $weeks[$key] = $from.' - '.$to; } var_export($weeks);

Abusive script

This script was stopped while abusing our resources

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.110.0100.01020.94
8.3.100.0080.00016.62
8.3.90.0030.00526.77
8.3.80.0090.00018.43
8.3.70.0060.00916.58
8.3.60.0080.00816.75
8.3.50.0150.00318.21
8.3.40.0140.00718.93
8.3.30.0100.01018.72
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0060.00326.16
8.2.230.0090.00022.58
8.2.220.0040.00424.06
8.2.210.0080.00026.77
8.2.200.0030.00716.88
8.2.190.0150.00018.21
8.2.180.0040.01125.92
8.2.170.0100.01319.16
8.2.160.0030.01222.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0080.00819.14
8.2.110.0070.00320.52
8.2.100.0070.00319.14
8.2.90.0160.00618.42
8.2.80.0150.00519.18
8.2.70.0110.00533.44
8.2.60.0130.00738.79
8.2.50.0160.00538.65
8.2.40.0120.00739.30
8.2.30.0110.00738.80
8.2.20.0150.00439.49
8.2.10.0120.00533.62
8.2.00.0140.00539.21
8.1.290.0070.00730.84
8.1.280.0070.01025.92
8.1.270.0060.00322.16
8.1.260.0030.00726.35
8.1.250.0050.00328.09
8.1.240.0000.01018.72
8.1.230.0100.00018.95
8.1.220.0160.00218.25
8.1.210.0150.00618.84
8.1.200.0140.00538.55
8.1.190.0150.00538.51
8.1.180.0130.00638.63
8.1.170.0090.00838.65
8.1.160.0110.00739.04
8.1.150.0120.00538.84
8.1.140.0130.00539.31
8.1.130.0140.00338.51
8.1.120.0160.00238.60
8.1.110.0130.00538.62
8.1.100.0120.00538.58
8.1.90.0140.00438.57
8.1.80.0170.00338.60
8.1.70.0150.00538.61
8.1.60.0130.00638.61
8.1.50.0180.00638.65
8.1.40.0180.00538.52
8.1.30.0210.00138.63
8.1.20.0150.00537.89
8.1.10.0170.00738.64
8.1.00.0200.00538.59
8.0.300.0150.00419.01
8.0.290.0110.00737.98
8.0.280.0120.00638.57
8.0.270.0160.00338.56
8.0.260.0140.00438.21
8.0.250.0130.00538.16
8.0.240.0150.00438.25
8.0.230.0120.00638.13
8.0.220.0090.00537.70
8.0.210.0160.00238.11
8.0.200.0130.00538.17
8.0.190.0130.00438.04
8.0.180.0170.00538.20
8.0.170.0150.00638.27
8.0.160.0150.00738.12
8.0.150.0140.00637.64
8.0.140.0190.00338.09
8.0.130.0180.00438.12
8.0.120.0180.00438.18
8.0.110.0150.00738.07
8.0.100.0140.00838.12
8.0.90.0150.00538.08
8.0.80.0210.00238.09
8.0.70.0170.00738.19
8.0.60.0180.00338.16
8.0.50.0160.00638.15
8.0.30.0170.00438.17
8.0.20.0190.00338.21
8.0.10.0180.00538.24
7.4.330.0120.00137.14
7.4.320.0120.00337.86
7.4.300.0140.00337.83
7.4.290.0140.00737.80
7.4.280.0180.00337.86
7.4.270.0160.00637.88
7.4.260.0160.00737.96
7.4.250.0200.00337.84
7.4.240.0170.00537.88
7.4.230.0180.00537.84
7.4.220.0180.00337.79
7.4.210.0160.00437.85
7.4.200.0140.00637.92
7.4.190.0180.00337.90
7.4.180.0140.00637.97
7.4.160.0190.00137.93
7.4.150.0140.00637.78
7.4.140.0160.00537.70
7.4.130.0170.00337.88
7.4.120.0150.00437.82
7.4.110.0140.00337.80
7.4.100.0110.00737.87
7.4.90.0140.00237.82
7.4.80.0120.00437.82
7.4.70.0100.00737.86
7.4.60.0140.00537.63
7.4.50.0110.00737.73
7.4.40.0120.00637.77
7.4.30.0150.00337.81
7.4.20.0150.00437.90
7.4.10.0140.00437.84
7.4.00.0110.00737.90

preferences:
33.58 ms | 403 KiB | 5 Q