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(); $end = new \DateTime('+ 4 months'); $interval = new \DateInterval('P5D'); $period = new \DatePeriod($start, $interval, $end); $format = 'l d-m-Y'; $date = new \DateTime('2014-05-23'); for($i = 0; $i < 100; $i++){ echo $date->format($format) . "\n"; $date = getSameDayNextYear($date); }

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.70.0100.01316.58
8.3.60.0100.00618.68
8.3.50.0140.00722.02
8.3.40.0130.00918.73
8.3.30.0060.00919.02
8.3.20.0000.00820.16
8.3.10.0050.00323.51
8.3.00.0050.00322.14
8.2.180.0120.00916.88
8.2.170.0100.00622.96
8.2.160.0080.00819.26
8.2.150.0090.00024.18
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0090.00620.85
8.2.110.0030.00722.20
8.2.100.0090.00518.03
8.2.90.0000.00819.39
8.2.80.0090.00018.18
8.2.70.0030.00617.88
8.2.60.0070.00318.05
8.2.50.0090.00318.07
8.2.40.0040.00419.50
8.2.30.0000.00818.12
8.2.20.0080.00017.92
8.2.10.0030.00617.94
8.2.00.0030.00618.00
8.1.280.0040.01225.92
8.1.270.0030.00523.97
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00023.96
8.1.230.0070.00419.28
8.1.220.0030.00617.91
8.1.210.0040.00418.77
8.1.200.0030.00717.60
8.1.190.0030.01017.53
8.1.180.0040.00418.10
8.1.170.0000.00918.97
8.1.160.0030.00522.09
8.1.150.0090.00018.91
8.1.140.0050.00221.08
8.1.130.0040.00417.96
8.1.120.0080.00017.68
8.1.110.0000.00917.72
8.1.100.0040.00417.65
8.1.90.0040.00417.77
8.1.80.0050.00317.73
8.1.70.0040.00417.61
8.1.60.0050.00517.83
8.1.50.0060.00317.66
8.1.40.0060.00317.71
8.1.30.0040.00417.74
8.1.20.0000.00817.86
8.1.10.0030.00617.68
8.1.00.0000.01217.65
8.0.300.0000.00818.77
8.0.290.0080.00017.18
8.0.280.0020.00518.59
8.0.270.0000.00717.29
8.0.260.0040.00417.13
8.0.250.0080.00017.09
8.0.240.0000.00817.12
8.0.230.0000.00817.16
8.0.220.0080.00017.05
8.0.210.0040.00417.07
8.0.200.0050.00317.11
8.0.190.0080.00017.23
8.0.180.0000.00817.04
8.0.170.0040.00417.10
8.0.160.0000.00817.05
8.0.150.0000.00817.02
8.0.140.0040.00417.13
8.0.130.0000.00613.62
8.0.120.0040.00417.21
8.0.110.0080.00017.23
8.0.100.0080.00017.11
8.0.90.0000.00817.23
8.0.80.0080.00817.08
8.0.70.0030.00616.96
8.0.60.0080.00017.23
8.0.50.0000.01116.94
8.0.30.0130.00717.30
8.0.20.0140.00717.40
8.0.10.0050.00317.11
8.0.00.0090.01516.93
7.4.330.0000.00515.25
7.4.320.0030.00516.80
7.4.300.0000.00716.75
7.4.290.0040.00416.75
7.4.280.0000.00716.74
7.4.270.0060.00316.65
7.4.260.0000.00816.72
7.4.250.0040.00416.77
7.4.240.0040.00416.69
7.4.230.0040.00416.79
7.4.220.0080.01216.73
7.4.210.0100.00716.86
7.4.200.0000.00716.55
7.4.190.0030.00517.00
7.4.160.0110.00716.65
7.4.150.0190.00017.40
7.4.140.0130.00817.86
7.4.130.0100.01016.74
7.4.120.0090.01116.85
7.4.110.0110.00816.84
7.4.100.0130.00616.79
7.4.90.0160.00316.85
7.4.80.0040.01416.88
7.4.70.0110.00716.68
7.4.60.0170.00616.82
7.4.50.0100.00016.68
7.4.40.0090.00922.77
7.4.30.0140.00316.64
7.4.00.0070.01015.13
7.3.330.0000.00613.57
7.3.320.0060.00013.40
7.3.310.0000.00716.60
7.3.300.0000.00816.64
7.3.290.0130.01116.58
7.3.280.0100.01016.58
7.3.270.0140.00617.40
7.3.260.0080.01116.90
7.3.250.0140.00616.88
7.3.240.0040.01516.84
7.3.230.0110.00816.59
7.3.210.0070.01416.64
7.3.200.0100.01319.39
7.3.190.0050.00416.82
7.3.180.0120.00616.83
7.3.170.0060.01316.87
7.3.160.0090.00916.63
7.3.120.0030.01315.27
7.2.330.0110.01116.70
7.2.320.0070.01316.99
7.2.310.0070.01017.02
7.2.300.0110.00816.91
7.2.290.0060.01216.91
7.2.60.0000.01517.25
7.2.50.0090.01217.12
7.1.200.0130.00015.89
7.1.70.0040.00417.41
7.1.60.0040.02219.29
7.1.50.0030.02117.10
7.1.00.0070.07322.32
7.0.200.0090.00317.09
7.0.140.0130.06722.18
7.0.60.0030.04320.03
7.0.50.0170.04317.89
7.0.40.0130.07320.04
7.0.30.0370.06720.24
7.0.20.0400.07720.06
7.0.10.0130.08720.30
7.0.00.0000.05020.16
5.6.280.0100.07021.10
5.6.210.0100.05720.53
5.6.200.0100.04718.16
5.6.190.0070.08020.52
5.6.180.0130.04720.61
5.6.170.0430.07020.55
5.6.160.0030.04320.55
5.6.150.0000.04318.16
5.6.140.0000.08718.19
5.6.130.0000.06718.26
5.6.120.0130.05021.00
5.6.110.0030.08020.90
5.6.100.0100.03720.96
5.6.90.0070.09720.97
5.6.80.0170.07020.51
5.5.350.0070.08020.27
5.5.340.0100.04718.02
5.5.330.0130.06320.27
5.5.320.0070.07020.42
5.5.310.0230.05020.27
5.5.300.0030.04317.98
5.5.290.0100.08017.98
5.5.280.0070.05320.77
5.5.270.0070.08720.63
5.5.260.0000.06020.77
5.5.250.0070.03720.47
5.5.240.4270.04320.19
5.4.450.1030.03719.28
5.4.440.0670.04019.33
5.4.430.1230.03719.16
5.4.420.0830.09019.57
5.4.410.0670.03719.27
5.4.400.1630.05019.10
5.4.390.0570.06019.32
5.4.380.0270.06718.80
5.4.370.0430.05018.69
5.4.360.0730.04318.50
5.4.350.0370.07718.59
5.4.340.0370.05018.75
5.4.320.0090.04112.50
5.4.310.0090.03712.50
5.4.300.0070.04212.50
5.4.290.0060.04412.50
5.4.280.0050.04112.38
5.4.270.0090.04112.38
5.4.260.0080.05012.39
5.4.250.0090.05712.39
5.4.240.0100.05212.38
5.4.230.0080.05012.38
5.4.220.0060.05012.37
5.4.210.0090.06412.38
5.4.200.0150.06112.38
5.4.190.0120.05812.37
5.4.180.0100.05712.37
5.4.170.0110.05712.39
5.4.160.0100.05412.38
5.4.150.0110.05612.38
5.4.140.0080.05912.06
5.4.130.0030.04712.05
5.4.120.0110.03912.00
5.4.110.0050.04212.00
5.4.100.0090.03812.00
5.4.90.0120.03711.99
5.4.80.0090.04212.00
5.4.70.0070.03711.99
5.4.60.0090.04212.00
5.4.50.0090.05212.00
5.4.40.0090.05211.98
5.4.30.0060.04011.98
5.4.20.0100.04011.98
5.4.10.0040.04411.98
5.4.00.0050.05611.47
5.3.290.0050.04512.80
5.3.280.0110.03612.71
5.3.270.0120.03612.72
5.3.260.0110.03712.72
5.3.250.0060.04112.72
5.3.240.0070.03912.72
5.3.230.0060.04112.71
5.3.220.0090.03812.68
5.3.210.0060.04112.68
5.3.200.0080.03712.68
5.3.190.0060.04712.68
5.3.180.0150.07012.67
5.3.170.0150.06612.67
5.3.160.0080.04312.67
5.3.150.0130.04012.67
5.3.140.0060.04012.66
5.3.130.0100.04112.66
5.3.120.0100.05112.66
5.3.110.0070.04712.66
5.3.100.0080.04812.11
5.3.90.0130.06112.09
5.3.80.0140.07612.08
5.3.70.0080.05612.08
5.3.60.0120.03712.07
5.3.50.0100.04812.00
5.3.40.0190.09112.00
5.3.30.0380.12111.96
5.3.20.0120.05911.75
5.3.10.0090.05911.71
5.3.00.0060.05311.71
5.2.170.0070.0429.19
5.2.160.0130.0299.18
5.2.150.0070.0349.18
5.2.140.0130.0549.18
5.2.130.0080.0339.14
5.2.120.0060.0319.14
5.2.110.0070.0329.15
5.2.100.0080.0309.15
5.2.90.0040.0349.14
5.2.80.0070.0329.14
5.2.70.0080.0429.14
5.2.60.0060.0349.10
5.2.50.0060.0409.07
5.2.40.0120.0309.03
5.2.30.0090.0489.01
5.2.20.0140.0409.00
5.2.10.0070.0378.92
5.2.00.0110.0568.78
5.1.60.0050.0308.06
5.1.50.0050.0248.06
5.1.40.0030.0268.04
5.1.30.0060.0278.39
5.1.20.0040.0418.41
5.1.10.0060.0418.14
5.1.00.0090.0248.14
5.0.50.0050.0216.62
5.0.40.0040.0196.48
5.0.30.0040.0336.29
5.0.20.0040.0206.26
5.0.10.0020.0226.24
5.0.00.0050.0306.23
4.4.90.0050.0154.78
4.4.80.0030.0234.75
4.4.70.0040.0224.75
4.4.60.0030.0194.76
4.4.50.0050.0144.77
4.4.40.0020.0274.71
4.4.30.0020.0174.76
4.4.20.0020.0184.84
4.4.10.0030.0164.84
4.4.00.0040.0284.76
4.3.110.0050.0214.67
4.3.100.0040.0204.66
4.3.90.0040.0364.63
4.3.80.0050.0304.59
4.3.70.0070.0184.63
4.3.60.0030.0194.63
4.3.50.0030.0164.63
4.3.40.0030.0244.53
4.3.30.0030.0163.29
4.3.20.0020.0183.27
4.3.10.0050.0193.23
4.3.00.0300.01313.64

preferences:
42.96 ms | 401 KiB | 5 Q