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); }
Output for git.master, git.master_jit, rfc.property-hooks
Friday 23-05-2014 Friday 22-05-2015 Friday 27-05-2016 Friday 26-05-2017 Friday 25-05-2018 Friday 24-05-2019 Friday 22-05-2020 Friday 28-05-2021 Friday 27-05-2022 Friday 26-05-2023 Friday 24-05-2024 Friday 23-05-2025 Friday 22-05-2026 Friday 28-05-2027 Friday 26-05-2028 Friday 25-05-2029 Friday 24-05-2030 Friday 23-05-2031 Friday 21-05-2032 Friday 27-05-2033 Friday 26-05-2034 Friday 25-05-2035 Friday 23-05-2036 Friday 22-05-2037 Friday 28-05-2038 Friday 27-05-2039 Friday 25-05-2040 Friday 24-05-2041 Friday 23-05-2042 Friday 22-05-2043 Friday 27-05-2044 Friday 26-05-2045 Friday 25-05-2046 Friday 24-05-2047 Friday 22-05-2048 Friday 28-05-2049 Friday 27-05-2050 Friday 26-05-2051 Friday 24-05-2052 Friday 23-05-2053 Friday 22-05-2054 Friday 28-05-2055 Friday 26-05-2056 Friday 25-05-2057 Friday 24-05-2058 Friday 23-05-2059 Friday 21-05-2060 Friday 27-05-2061 Friday 26-05-2062 Friday 25-05-2063 Friday 23-05-2064 Friday 22-05-2065 Friday 28-05-2066 Friday 27-05-2067 Friday 25-05-2068 Friday 24-05-2069 Friday 23-05-2070 Friday 22-05-2071 Friday 27-05-2072 Friday 26-05-2073 Friday 25-05-2074 Friday 24-05-2075 Friday 22-05-2076 Friday 28-05-2077 Friday 27-05-2078 Friday 26-05-2079 Friday 24-05-2080 Friday 23-05-2081 Friday 22-05-2082 Friday 28-05-2083 Friday 26-05-2084 Friday 25-05-2085 Friday 24-05-2086 Friday 23-05-2087 Friday 21-05-2088 Friday 27-05-2089 Friday 26-05-2090 Friday 25-05-2091 Friday 23-05-2092 Friday 22-05-2093 Friday 28-05-2094 Friday 27-05-2095 Friday 25-05-2096 Friday 24-05-2097 Friday 23-05-2098 Friday 22-05-2099 Friday 28-05-2100 Friday 27-05-2101 Friday 26-05-2102 Friday 25-05-2103 Friday 23-05-2104 Friday 22-05-2105 Friday 28-05-2106 Friday 27-05-2107 Friday 25-05-2108 Friday 24-05-2109 Friday 23-05-2110 Friday 22-05-2111 Friday 27-05-2112 Friday 26-05-2113

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
72.64 ms | 411 KiB | 5 Q