3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @param \DateTime $date Date of the original meeting * @return \DateTime Date of the next meeting */ function getSameDayNextYear(\DateTime $date = null) { if(!$date){ $date = new \DateTime(); } return (new \DateTime())->setISODate((int)$date->format('o') - 1, (int)$date->format('W'), (int)$date->format('N')); } $start = new \DateTime('-6 months'); $end = new \DateTime('+ 4 months'); $interval = new \DateInterval('P5D'); $period = new \DatePeriod($start, $interval, $end); $format = 'l d-m-Y'; foreach($period as $date){ echo $date->format($format) . ' => ' . getSameDayNextYear($date)->format($format) . "\n"; }

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.0060.00916.75
8.3.50.0060.01216.48
8.3.40.0100.01018.96
8.3.30.0080.00818.96
8.3.20.0040.00421.77
8.3.10.0040.00423.68
8.3.00.0060.00320.09
8.2.180.0150.00618.25
8.2.170.0130.00622.96
8.2.160.0100.01020.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0060.00320.49
8.2.120.0040.00426.35
8.2.110.0080.00319.32
8.2.100.0060.00618.18
8.2.90.0030.00619.46
8.2.80.0040.00418.05
8.2.70.0040.00418.05
8.2.60.0070.00317.93
8.2.50.0000.00918.10
8.2.40.0030.00520.42
8.2.30.0000.00821.21
8.2.20.0050.00318.20
8.2.10.0000.00818.21
8.2.00.0040.00418.14
8.1.280.0140.00725.92
8.1.270.0040.00422.23
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00322.23
8.1.230.0040.00820.93
8.1.220.0030.00617.88
8.1.210.0060.00318.77
8.1.200.0040.00717.60
8.1.190.0040.00417.60
8.1.180.0050.00318.10
8.1.170.0050.00318.84
8.1.160.0040.00419.04
8.1.150.0040.00420.23
8.1.140.0060.00319.76
8.1.130.0060.00319.04
8.1.120.0050.00317.72
8.1.110.0000.00817.62
8.1.100.0030.00517.70
8.1.90.0050.00317.75
8.1.80.0080.00017.77
8.1.70.0000.00717.78
8.1.60.0040.00417.83
8.1.50.0030.00517.77
8.1.40.0000.00817.76
8.1.30.0040.00417.82
8.1.20.0040.00417.78
8.1.10.0050.00317.75
8.1.00.0050.00317.73
8.0.300.0000.00921.55
8.0.290.0030.00617.00
8.0.280.0050.00318.53
8.0.270.0040.00417.32
8.0.260.0000.00917.01
8.0.250.0080.00017.29
8.0.240.0030.00617.27
8.0.230.0030.00617.20
8.0.220.0070.00017.07
8.0.210.0040.00417.04
8.0.200.0000.00817.24
8.0.190.0060.00317.24
8.0.180.0040.00417.15
8.0.170.0000.00817.17
8.0.160.0040.00417.18
8.0.150.0030.00517.02
8.0.140.0030.00817.17
8.0.130.0000.00613.48
8.0.120.0040.00417.09
8.0.110.0050.00317.06
8.0.100.0050.00317.00
8.0.90.0080.00017.00
8.0.80.0030.01417.09
8.0.70.0040.00416.98
8.0.60.0030.00517.28
8.0.50.0060.00317.19
8.0.30.0070.01117.25
8.0.20.0130.01217.40
8.0.10.0040.00417.25
8.0.00.0140.00516.96
7.4.330.0070.00015.55
7.4.320.0000.00716.67
7.4.300.0060.00016.70
7.4.290.0050.00516.83
7.4.280.0040.00416.65
7.4.270.0050.00216.82
7.4.260.0020.00516.81
7.4.250.0000.00916.76
7.4.240.0000.00916.79
7.4.230.0030.00516.69
7.4.220.0060.01016.63
7.4.210.0110.00416.71
7.4.200.0000.00716.79
7.4.160.0130.00916.90
7.4.150.0090.00917.40
7.4.140.0120.01017.86
7.4.130.0100.01016.67
7.4.120.0100.01116.72
7.4.110.0130.01016.75
7.4.100.0060.01616.63
7.4.90.0100.01016.82
7.4.80.0100.01419.39
7.4.70.0090.00916.67
7.4.60.0150.00316.70
7.4.50.0100.00616.74
7.4.40.0110.01116.91
7.4.30.0120.00916.78
7.4.00.0070.01115.31
7.3.330.0000.00613.63
7.3.320.0070.00013.64
7.3.310.0000.00816.57
7.3.300.0070.00016.50
7.3.290.0090.00816.60
7.3.280.0110.00716.54
7.3.270.0120.00817.40
7.3.260.0110.00716.89
7.3.250.0070.01116.57
7.3.240.0090.01116.54
7.3.230.0130.00616.82
7.3.210.0150.00316.66
7.3.200.0050.01316.68
7.3.190.0090.01616.73
7.3.180.0030.01816.83
7.3.170.0130.00616.72
7.3.160.0070.01116.76
7.2.330.0060.01316.97
7.2.320.0130.00916.72
7.2.310.0090.01216.95
7.2.300.0030.01516.89
7.2.290.0100.01017.07
7.2.110.0090.00616.79
7.2.60.0130.00517.18
7.2.50.0090.00617.21
7.1.200.0040.00815.68
7.1.70.0040.00417.44
7.1.60.0930.01733.17
7.1.50.1330.01033.27
7.1.40.1500.02332.84
7.1.30.1470.02032.76
7.1.20.0930.01032.83
7.1.10.0670.01315.02
7.1.00.0570.01715.08
7.0.200.1500.02015.07
7.0.190.1330.01315.05
7.0.180.0700.01714.62
7.0.170.0630.01314.64
7.0.160.0630.01014.51
7.0.150.0900.00714.49
7.0.140.0700.01014.53
7.0.130.0770.01014.75
7.0.120.0730.00714.86
7.0.110.0700.01314.63
7.0.100.0830.00714.68
7.0.90.0730.00714.52
7.0.80.0530.01314.77
7.0.70.0900.01714.57
7.0.60.0570.01014.64
7.0.50.0670.01714.72
7.0.40.0630.01314.88
7.0.30.0670.01714.83
7.0.20.0500.01714.66
7.0.10.0600.01314.92
7.0.00.0600.01314.79

preferences:
54.78 ms | 400 KiB | 5 Q