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 getSameDayLastYear(\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('+2 years'); $end = new \DateTime('+5 years'); $interval = new \DateInterval('P1D'); $period = new \DatePeriod($start, $interval, $end); $format = 'Y-m-d'; echo "insert ignore into TblDatesDev (date, lastYear) VALUES \n"; foreach($period as $date){ echo "('".$date->format($format)."','".getSameDayLastYear($date)->format($format)."'),\n"; //echo $date->format($format) . ' => ' . getSameDayLastYear($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.70.0030.02118.44
8.3.60.0170.01316.63
8.3.50.0120.01517.40
8.3.40.0100.02318.92
8.3.30.0090.01518.96
8.3.20.0080.00421.65
8.3.10.0120.00023.52
8.3.00.0130.00017.84
8.2.180.0180.01416.88
8.2.170.0110.01422.96
8.2.160.0100.02219.41
8.2.150.0120.00324.18
8.2.140.0100.00324.66
8.2.130.0030.00920.64
8.2.120.0030.00926.35
8.2.110.0090.00620.52
8.2.100.0150.01418.09
8.2.90.0040.01119.22
8.2.80.0100.00617.97
8.2.70.0030.01217.71
8.2.60.0040.01417.93
8.2.50.0040.01118.10
8.2.40.0060.00920.63
8.2.30.0040.00921.05
8.2.20.0000.01518.22
8.2.10.0080.00818.19
8.2.00.0060.00918.33
8.1.280.0110.02525.92
8.1.270.0090.00322.27
8.1.260.0000.01426.35
8.1.250.0030.01028.09
8.1.240.0110.00423.91
8.1.230.0140.00719.14
8.1.220.0070.01117.89
8.1.210.0040.01118.77
8.1.200.0060.01017.47
8.1.190.0000.01717.35
8.1.180.0140.00318.10
8.1.170.0060.01018.82
8.1.160.0110.00418.92
8.1.150.0080.00620.37
8.1.140.0040.01119.73
8.1.130.0000.01819.08
8.1.120.0080.00817.79
8.1.110.0000.01417.71
8.1.100.0000.01517.65
8.1.90.0120.00417.77
8.1.80.0000.01617.64
8.1.70.0030.01317.78
8.1.60.0030.01217.68
8.1.50.0030.01017.62
8.1.40.0040.01117.65
8.1.30.0070.01017.85
8.1.20.0100.00617.73
8.1.10.0080.00817.76
8.1.00.0060.00917.72
8.0.300.0000.01418.77
8.0.290.0090.00617.00
8.0.280.0070.01018.53
8.0.270.0000.01417.42
8.0.260.0030.01216.99
8.0.250.0040.01117.23
8.0.240.0040.01417.15
8.0.230.0000.01617.24
8.0.220.0100.00717.10
8.0.210.0060.01217.19
8.0.200.0030.01117.21
8.0.190.0100.00717.29
8.0.180.0070.01017.22
8.0.170.0070.01317.30
8.0.160.0000.01517.10
8.0.150.0070.01017.03
8.0.140.0040.01517.14
8.0.130.0000.01113.58
8.0.120.0060.01217.13
8.0.110.0060.00917.13
8.0.100.0040.01117.05
8.0.90.0040.01116.98
8.0.80.0070.03717.20
8.0.70.0060.01017.13
8.0.60.0000.01517.05
8.0.50.0100.00717.14
8.0.30.0230.01717.38
8.0.20.0280.04017.40
8.0.10.0070.00717.20
8.0.00.0180.02417.06
7.4.330.0050.01015.55
7.4.320.0030.01316.72
7.4.300.0060.00916.72
7.4.290.0040.01516.74
7.4.280.0080.00816.62
7.4.270.0040.01416.75
7.4.260.0060.00916.86
7.4.250.0100.01016.67
7.4.240.0040.01416.66
7.4.230.0030.01416.59
7.4.220.0130.03016.80
7.4.210.0120.02116.86
7.4.200.0000.01516.62
7.4.160.0140.02316.89
7.4.150.0210.02717.40
7.4.140.0190.03417.86
7.4.130.0120.03316.85
7.4.120.0180.03116.70
7.4.110.0180.01516.70
7.4.100.0230.03316.82
7.4.90.0230.01616.64
7.4.80.0060.04119.39
7.4.70.0130.02816.80
7.4.60.0090.02216.86
7.4.50.0070.02016.96
7.4.40.0160.02216.59
7.4.30.0130.02616.76
7.4.00.0070.01815.40
7.3.330.0070.00313.61
7.3.320.0070.00413.57
7.3.310.0060.00916.49
7.3.300.0040.01116.64
7.3.290.0120.02716.61
7.3.280.0110.02916.57
7.3.270.0160.01917.40
7.3.260.0160.03516.69
7.3.250.0170.02316.80
7.3.240.0130.02616.51
7.3.230.0210.01816.66
7.3.210.0120.03016.71
7.3.200.0150.03416.68
7.3.190.0120.03116.75
7.3.180.0090.03016.71
7.3.170.0180.02816.59
7.3.160.0130.02516.56
7.2.330.0270.03517.01
7.2.320.0080.02516.98
7.2.310.0070.02817.02
7.2.300.0060.03616.96
7.2.290.0200.02016.88
7.2.60.0090.01516.75
7.2.50.0100.01317.09
7.1.200.0100.01016.05
7.1.70.0110.00417.44
7.1.60.0230.03033.35
7.1.50.0330.01333.16
7.1.40.0300.01732.75
7.1.30.0270.03033.04
7.1.20.0300.02732.95
7.1.10.0100.03015.14
7.1.00.1770.02014.97
7.0.200.0170.02715.18
7.0.190.0200.02315.11
7.0.180.0630.03314.62
7.0.170.0130.01314.69
7.0.160.0130.03014.57
7.0.150.0230.03014.64
7.0.140.1400.02714.56
7.0.130.1300.02714.85
7.0.120.0100.02314.95
7.0.110.1700.02314.91
7.0.100.1030.03014.63
7.0.90.0070.02314.81
7.0.80.0070.03314.70
7.0.70.0100.03314.44
7.0.60.0030.02714.29
7.0.50.1870.02714.61
7.0.40.1570.03014.75
7.0.30.1170.02314.66
7.0.20.0100.02314.81
7.0.10.0130.02714.69
7.0.00.0100.03314.80

preferences:
31.44 ms | 401 KiB | 5 Q