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('-5 years'); $end = new \DateTime('-3 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.60.0100.01916.63
8.3.50.0120.01216.76
8.3.40.0140.01018.92
8.3.30.0030.01818.66
8.3.20.0040.00821.73
8.3.10.0060.00623.66
8.3.00.0070.00418.00
8.2.180.0120.00918.41
8.2.170.0070.01422.96
8.2.160.0130.01319.63
8.2.150.0040.00724.18
8.2.140.0110.00024.66
8.2.130.0040.00720.38
8.2.120.0040.00826.35
8.2.110.0070.00720.52
8.2.100.0090.00917.97
8.2.90.0060.00619.21
8.2.80.0040.01117.97
8.2.70.0080.00617.88
8.2.60.0090.00318.04
8.2.50.0030.01018.10
8.2.40.0030.01020.77
8.2.30.0070.00721.04
8.2.20.0090.00318.20
8.2.10.0030.01018.28
8.2.00.0030.01018.30
8.1.280.0130.01325.92
8.1.270.0110.00022.10
8.1.260.0130.00026.35
8.1.250.0090.00328.09
8.1.240.0080.00621.43
8.1.230.0070.01117.89
8.1.220.0000.01317.80
8.1.210.0030.01018.77
8.1.200.0070.00717.61
8.1.190.0070.00717.47
8.1.180.0000.01418.10
8.1.170.0070.00718.91
8.1.160.0060.00618.92
8.1.150.0040.00820.39
8.1.140.0060.00619.71
8.1.130.0070.01019.05
8.1.120.0060.00617.64
8.1.110.0060.00617.64
8.1.100.0140.00017.77
8.1.90.0070.00717.67
8.1.80.0030.00917.63
8.1.70.0080.00417.77
8.1.60.0090.00617.71
8.1.50.0030.01017.75
8.1.40.0000.01217.59
8.1.30.0030.01017.89
8.1.20.0000.01317.80
8.1.10.0000.01317.81
8.1.00.0100.00317.79
8.0.300.0030.01018.77
8.0.290.0070.01017.13
8.0.280.0030.00918.66
8.0.270.0080.00417.30
8.0.260.0110.00017.04
8.0.250.0150.00017.22
8.0.240.0100.00317.11
8.0.230.0110.00417.31
8.0.220.0040.01117.16
8.0.210.0060.00617.07
8.0.200.0030.01017.29
8.0.190.0030.01217.12
8.0.180.0030.01317.24
8.0.170.0080.00817.05
8.0.160.0030.00917.16
8.0.150.0090.00617.19
8.0.140.0110.00617.07
8.0.130.0000.01113.50
8.0.120.0000.01317.18
8.0.110.0080.00417.13
8.0.100.0060.00617.15
8.0.90.0040.00817.10
8.0.80.0100.02417.11
8.0.70.0100.00717.08
8.0.60.0030.01017.09
8.0.50.0070.01017.06
8.0.30.0170.01217.27
8.0.20.0130.01917.42
8.0.10.0060.00617.42
8.0.00.0070.02317.20
7.4.330.0070.00715.55
7.4.320.0000.01416.88
7.4.300.0040.00716.85
7.4.290.0040.01616.88
7.4.280.0060.00616.81
7.4.270.0030.00916.63
7.4.260.0030.01016.71
7.4.250.0060.00616.65
7.4.240.0000.01516.74
7.4.230.0070.00716.62
7.4.220.0120.03416.85
7.4.210.0060.02916.75
7.4.200.0040.00816.62
7.4.160.0150.01816.74
7.4.150.0130.02217.40
7.4.140.0160.02017.86
7.4.130.0140.02316.68
7.4.120.0130.03416.75
7.4.110.0160.01916.99
7.4.100.0130.02416.75
7.4.90.0280.02516.70
7.4.80.0260.02319.39
7.4.70.0110.02816.87
7.4.60.0060.02516.70
7.4.50.0060.01616.77
7.4.40.0210.01216.73
7.4.30.0070.02516.95
7.4.00.0070.01415.34
7.3.330.0030.00713.34
7.3.320.0060.00313.57
7.3.310.0040.01116.48
7.3.300.0030.00916.51
7.3.290.0100.02016.61
7.3.280.0120.02116.59
7.3.270.0090.02517.40
7.3.260.0150.02116.62
7.3.250.0130.02016.78
7.3.240.0210.01916.69
7.3.230.0250.02116.76
7.3.210.0180.01516.64
7.3.200.0070.02016.68
7.3.190.0250.01116.63
7.3.180.0140.02816.58
7.3.170.0120.01916.91
7.3.160.0180.01416.62
7.2.330.0190.01616.78
7.2.320.0250.02516.91
7.2.310.0140.01716.89
7.2.300.0140.02916.90
7.2.290.0150.01517.09
7.2.60.0150.02016.81
7.2.50.0060.01016.91
7.1.200.0150.00616.09
7.1.70.0130.01317.41
7.1.60.1600.02333.67
7.1.50.1330.02733.39
7.1.40.1500.01032.75
7.1.30.1300.01732.89
7.1.20.1200.02333.13
7.1.10.0930.01715.16
7.1.00.1230.02315.24
7.0.200.1630.02315.28
7.0.190.1470.02715.16
7.0.180.1470.02314.79
7.0.170.2300.02714.64
7.0.160.1670.01714.60
7.0.150.0970.02014.79
7.0.140.1200.03314.58
7.0.130.0970.02314.71
7.0.120.1170.02014.71
7.0.110.0470.01714.58
7.0.100.1000.01714.56
7.0.90.0930.02014.73
7.0.80.0830.02014.63
7.0.70.0670.02314.55
7.0.60.0830.02314.52
7.0.50.1230.02314.72
7.0.40.0900.03014.71
7.0.30.0870.02014.99
7.0.20.1000.01314.75
7.0.10.0830.02014.63
7.0.00.0900.02314.69

preferences:
69.25 ms | 400 KiB | 5 Q