3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new \DateTime('first day of this month'); $end = (new \DateTime('first day of this month'))->modify('+18 months'); $interval = new \DateInterval('P1M'); $period = new \DatePeriod($start, $interval, $end); foreach ($period as $month) { $lastDayOfMonth = $month->format('t'); $day = (date('d') > $lastDayOfMonth) ? $lastDayOfMonth : date('d'); echo $month->format("n | Y | Y-m-{$day}"); echo "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
8 | 2018 | 2018-08-28 9 | 2018 | 2018-09-28 10 | 2018 | 2018-10-28 11 | 2018 | 2018-11-28 12 | 2018 | 2018-12-28 1 | 2019 | 2019-01-28 2 | 2019 | 2019-02-28 3 | 2019 | 2019-03-28 4 | 2019 | 2019-04-28 5 | 2019 | 2019-05-28 6 | 2019 | 2019-06-28 7 | 2019 | 2019-07-28 8 | 2019 | 2019-08-28 9 | 2019 | 2019-09-28 10 | 2019 | 2019-10-28 11 | 2019 | 2019-11-28 12 | 2019 | 2019-12-28 1 | 2020 | 2020-01-28

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:
28.58 ms | 406 KiB | 5 Q